I am using Oracle ODBC driver and want to dynamically pass variables. This is how my query looks like:
define val = 'Test';
select * from Table where Name = '&val'
While this query runs fine in Oracle SQL Developer, I think I am not writing the query right for ODBC driver to execute right. Any suggestions?
from ODBC logs:
EXIT SQLExecDirectW with return code -1 (SQL_ERROR) "define val = 'Test';\ aselect * from Table where Name = '&val';\ 0" DIAG [42000] [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement