home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 293 of 2,288   
   Jim Kennedy to Sugus   
   Re: Cursor parameters - problems with 'F   
   29 Aug 03 10:59:43   
   
   From: kennedy-down_with_spammers@no_spam.comcast.net   
      
   "Sugus"  wrote in message   
   news:76f56553.0308290221.4b4a65f3@posting.google.com...   
   > I'd like to declare a cursor, which accepts parameters also for the   
   > "FROM" tablename-clause, like:   
   >   
   > CURSOR cFielddef(pfromTable IN ?????, pTableName IN VARCHAR2) IS   
   > SELECT column_name, data_type, data_length, nullable FROM pfromTable   
   > WHERE table_name = UPPER(pTableName);   
   >   
   > Is it possible at all, and what type do I have to decalre in place of   
   > the questionsmarks? Any other solution?   
   >   
   > Thanks für your help,   
   >   
   > Sugus   
   What do you want the query to do?  You can't do it that way because Oracle   
   is trying to compile it and make sure the columns exist etc.  If it does not   
   know the tablename then how could it?  You would have to use dynamic sql   
   which may cause scalability problems.   
   Jim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca