Page 1 of 1

Insert into Oracle with reserved word

Posted: Fri Feb 26, 2016 3:23 am
by bicap
Hello,

I am using Oracle connector stage my insert statement have reserved word column DEFAULT..when I run my job it gives me error
ORA-01747: invalid user.table.column, table.column, or column specification

when I put "DEFAULT" in double quotes it gives me error ORA-01745: invalid host/bind variable name.

Do we have any other alternative apart from changing the name of column.

Thanks

Posted: Fri Feb 26, 2016 7:52 am
by chulett
Let me chime in with, even if you can work around it, having a table with a column name that is a reserved word falls firmly in the Not A Good Idea camp. IMHO. Have you verified that is indeed the problem? If the column is nullable, don't include it in the DML and then see if it works... as a test.

Posted: Mon Feb 29, 2016 9:29 am
by kduke
If you use generated code then add a quote character to properties then it will get the correct quote character. I am not sure what Oracle's quote character is but it appears not to be a double quote otherwise this would work.

Most databases work this same way. Keywords can be column names if quoted correctly.

I totally agree with Craig. This is never a good idea to have a column name the same name as a keyword but normally you can make it work. They had to quote it this way to create the table.

Posted: Mon Feb 29, 2016 10:54 am
by chulett
Oracle uses a double-quote as shown, guessing it confused the bind variable mechanism in the connector.