HOW? SELECT ... WHERE colName IN ( .... )

dozey

Member
Hi,

please could someone tell me how this is supposed to be written....

I have this...

select * from TABLE_NAME where COL_NAME in ( "VALUE_ONE", "VALUE_TWO" );

and I get an error message ORA-00904: "VALUE_TWO": invalid identifier

This would normally run in SQL, but does not work here...

What I am trying to do is to select a record from one or more possible COL_NAME

Please help;

Thanks in advance
/Brad
 
You should use single quotes:

select * from TABLE_NAME where COL_NAME in ( 'VALUE_ONE', 'VALUE_TWO')

The double quotes do not signify a string value, and therefore the expression is interpreted as an identifier.
 
Thank-you.... I also just realized this... how silly of me to do this.... its the same as SQL in that respect with the single/double quotes :(

Thanks for the help!
Brad
 
Back
Top