How to handel preserved words (as a columnname) into a stored procedure??
Hi out there,
Due to some history development (not mine) we had to convert and Interbase database into an Oracle environment. Some tables-columns where named "LABEL". This gave no problem into Interbase and when using a SQL editor this columns can be qeuried in Orcale. But when I want to define a cursor into a stored procedure it returns an error that it will not regognize the right datatype.
Here's the code I use;
SELECT ITEM.ITEM_CODE,
ITEM.LABEL||'_'||LPAD(ITEM.ITEM_CODE,4,0) AS TABCOL
FROM ITEM
WHERE ITEM.MODULE_CODE = xxxx
ORDER BY ITEM.ITEM_CODE;
I found out that the last one is not working because the LABEL column is a preserved word in Oracle. ( replace it by one of the other columns and it will work )!!
I don't think the error is not because of reserved word, Something else is causing that. You may post few lines of your actual code and people here can help.
Last edited by SANJAY_G; 09-19-2003 at 04:47 AM.
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
I'm building a string ( for a create table ) and declared it as a varchar2(32767). I've been told that the max of varchar2 can be 2000.
If so this will be the problem but I'm not sure about this.
After buiding the string I give an "execute Immediate" on it . can this statement handle such a long string??
Bookmarks