0

I have a variable call Name in a Procedure call getName

Dbms_Output.Put_Line('Name : ' || Name);

Output result
-------------
Name : 'John', 'Test'

However when I try pass in the Name variable into 'Where IN ()' statement in another procedure, it doesn't work. Any idea?

Where Name IN (Name);

Wouldn't that statement equivalent to

Where Name IN ('John', 'Test');
San
  • 4,508
  • 1
  • 13
  • 19
Sky
  • 3,350
  • 2
  • 14
  • 12
  • 1
    Unfortunately, you need to make it dynamic String only.. – Maheswaran Ravisankar Feb 25 '14 at 08:22
  • Oops... second link was supposed to be to [this question](http://stackoverflow.com/q/4672545/266304), which links to [Ask Tom](http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:210612357425). – Alex Poole Feb 25 '14 at 09:39
  • 1
    In addition to what Alex says, using a variable name that is identical to a column name is likely to cause confusion in anybody who tries to read your code. – Klas Lindbäck Feb 25 '14 at 11:39

0 Answers0