Trying to update an oracle 10g table using asp.net and the oracleclient connector
Here is the sql syntax:
UPDATE tableX set PURPOSE = 'T' where REQUEST_ID = '2543'
This throws an error:
ORA-00904: "PURPOSE": invalid identifier
If I try to update a different column
UPDATE tableX set DELIVERY_COMMENTS = 'T' where REQUEST_ID = '2543'
everything works fine.
The column PURPOSE does exist and I am able to INSERT information into the PURPOSE column.
Anyone have any ideas why this is not working?
I don't think PURPOSE is a resreved word but if it is it must be surrounded by double quotes"
set "PURPOSE" = 'T'.The column name may be lower case or mixed case. Run
select * from tableX where rownum < 2and see what SqlPlus says the column name is. The definitive way to determine the case of the column name isselect c.owner, c.column_id, c.column_name from all_tab_cols c where c.table_name = 'TABLEX' order by c.owner, c.column_idNotice that 'TABLEX' is all uppercase. If PURPOSE is not all uppercase it must be surrounded by double quotes so that Oracle treats it case sensitive.