Single quotes getting replaced in ODBC stage
Posted: Thu Oct 09, 2014 11:58 pm
Single Quotes is getting replaced in ODBC stage
Job structure is
ODBC - transformer - file
select query is like - select * from Sqlserver_tablename where condition - the whole query is passes from parameter #SQLQuery#
#SQLQuery# is getting value from
Trim(Convert(@FM," ",#Command_Execute.$CommandOutput#)) passed from the sequencer.
#Command_Execute.$CommandOutput#)) is getting value from a cat command
$cat Sql.txt
we had an issue when sql string is select * from table where column = 'FIRST'
THE QUOTES is getting replaced it is executed as - select * from table where column = FIRST and was giving error in datastge
I made the string as select * from table where column = \'FIRST\' and executed sequencer job executed successfully with desired results
The problem here this sql command is executed by client we cannot ask then to give slash before quotes we need to handle this in datastage
Can anyone please help me in this.
Thanks
Aneesh
Job structure is
ODBC - transformer - file
select query is like - select * from Sqlserver_tablename where condition - the whole query is passes from parameter #SQLQuery#
#SQLQuery# is getting value from
Trim(Convert(@FM," ",#Command_Execute.$CommandOutput#)) passed from the sequencer.
#Command_Execute.$CommandOutput#)) is getting value from a cat command
$cat Sql.txt
we had an issue when sql string is select * from table where column = 'FIRST'
THE QUOTES is getting replaced it is executed as - select * from table where column = FIRST and was giving error in datastge
I made the string as select * from table where column = \'FIRST\' and executed sequencer job executed successfully with desired results
The problem here this sql command is executed by client we cannot ask then to give slash before quotes we need to handle this in datastage
Can anyone please help me in this.
Thanks
Aneesh