Page 1 of 1

'#' in Where condition value of Oracle Query

Posted: Mon Apr 18, 2016 8:38 am
by balu536
Hi,
I'm using an Oracle query where one of columns in Where condition has '#' in value.

The query runs fine in Toad or SQL Developer but is failing in the Oracle Connector. Please help.

Original Query:
*************
SELECT * FROM TABLE_A WHERE COLUMN_A = 'AB CDE #' AND STG_ETL_BATCH_ID = 1


Query in the Director Log after Job run:
********************************
The following SQL statement failed: SELECT * FROM TABLE_A WHERE COLUMN_A = 'AB CDE STG_ETL_BATCH_ID = 1
********************************

Posted: Mon Apr 18, 2016 5:27 pm
by ray.wurlod
DataStage notes that "#" is a reserved character. It can (should) be replaced with the special value __035__ (documented here).

Posted: Tue Apr 19, 2016 11:23 am
by balu536
Thank you Ray!