All Forums Connectivity
dastrauch 1 post Joined 08/16
30 Aug 2016
query newline vs carriage return issue using Perl unixODBC and RHEL

I have installed teradata 64bit drivers,  unixODBC 2.3.4 and perl DBD::ODBC 1.52 on  RHEL 6 linux.
Everything is working with short single line queries from both isql and perl.  However, multi-line queries fail with
set_err: state ('400') is not a 5 character string, using 'S1000' instead at /usr/local/lib64/perl5/DBD/ line 229.
DBD::ODBC::db prepare failed:
isql also fails with a [ISQL]ERROR: Could not SQLPrepare
One solution is to replace the   newline character  with  carriage return  in perl .. before calling the prepare with
       $sql =~ s/\n/\r/g;
       $sthe = $dbhe->prepare($sql)
           or die "Couldn't prepare statement: " . $dbhe->errstr;
which works fine.   My question is:
Did I miss some EOL option when configuring the Teradata drivers or unixODBC that would allow newlines for linux instead of carriage returns?

You must sign in to leave a comment.