SqlDbx Forum

SqlDbx

You are not logged in.

#1 2013-09-10 17:55:42

nmogla
Member

Carriage Return not preserved in SQL - OBDC over Teradata

Hi
I am using SQLDbx over Teradata via ODBC. I ran the following query:

update TABLE_A
set
OrgCd='ABCD0065'
--PlngOrg='USA'
where
CustId in (123456789)
AND
OrgCd in ('ABCD0067')
--PlngOrg in('CANADA')

Surprisingly it updated all the records in the TABLE_A when it should update only one (because there is only record with CustID=123456789) . Upon checking I found that the actual query fired at the database is :

update TABLE_A set OrgCd='ABCD0065'  --PlngOrg='USA' where CustId in (123456789) AND OrgCd in ('ABCD0067') --PlngOrg in('CANADA')

It seems that the 'Carriage Return' is not preserved and query is fired as a one single line because of which the the first two dashes '--' commented everything after 'update TABLE_A set OrgCd='ABCD0065' .
I am not sure if this is the BUG in the TOOL or an ODBC setting which caused this.
Also, similar query when ran on SQL Assistant produced the desired results using the same ODBC DSN.
Does any body throw some light on this, please.

Thanks

Offline

#2 2013-09-10 20:31:57

sqldbxhelp
Administrator

Re: Carriage Return not preserved in SQL - OBDC over Teradata

Ok. This will have to be addressed. Looks like in this case Teradata needs
to understand start of single line comment.
SqlDbx by default uses only
to separate lines.

Offline

Board footer

Powered by FluxBB