Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid column name error

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I am passing a string sql to my procedure as:

IN_strsql = " and unit_id in(select mem_id from unit)"

In my store proc, I have this:

EXECUTE IMMEDIATE 'update tbl_base set jan = null, feb = null where line_id = 1 '|| IN_strsql;

I got an invalid column name on the update. I know that all the column names are correct and the string sql is being passed to the proc correctly, but am I passing it to the dynamic sql correctly?

Any help will be greatly appreciated.

 
Make sure your sql works in sqlplus exactly as it would appear in the dynamic sql. I assume you are not defining IN_strsql with double quotes? Make sure you do actually have a space between '1' and 'and'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top