Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Problem with variable in procedure

646894Jan 21 2010 — edited Jan 21 2010
Hello,

I have a string in a variable.

ignore_column_name := 'LAST_NAME';

I have a cursor in a procedure

CURSOR C1 is
SELECT column_name
FROM user_tab_columns
WHERE table_name = 'PATIENT'
AND column_name NOT IN (ignore_column_name);

I am using the above output to generate a column list and hence i should not be seeing 'LAST_NAME' in the output.

But this is not the case. For some strange reason the variable value does not get substituted into the cursor.

Could someone please help me get the desired result.

Thanks

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 18 2010
Added on Jan 21 2010
4 comments
462 views