Problem with variable in procedure
646894Jan 21 2010 — edited Jan 21 2010Hello,
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