Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: dbi odbc return string getting truncated

by perlnewbiedewbie (Initiate)
on Aug 08, 2019 at 12:33 UTC ( [id://11104164]=note: print w/replies, xml ) Need Help??


in reply to Re: dbi odbc return string getting truncated
in thread dbi odbc return string getting truncated

Thanks for the response. As Alexander said AS is optional and no FROM is like selecting single columns. I just want to keep example simple. I'm selecting single string column from the database and it's getting truncated, when I connect from isql to ODBC connection it's fine, so I assume that the problem is with DBI/perl. I don't have enough knowledge about perl to debug this - is there any tracing available for DBI?
  • Comment on Re^2: dbi odbc return string getting truncated

Replies are listed 'Best First'.
Re^3: dbi odbc return string getting truncated
by hippo (Bishop) on Aug 08, 2019 at 12:51 UTC
    is there any tracing available for DBI?

    Yes, there is. Just open up the DBI docs and search for tracing.

Re^3: dbi odbc return string getting truncated
by talexb (Chancellor) on Aug 08, 2019 at 14:41 UTC
      - is there any tracing available for DBI?

    Yes! There is tracing built in to DBI. It's right there in the documentation.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      Tracing gives me that:
      <- fetchrow_arrayref= ( [ 'S...T...A.........' ] ) [1 items] row1 at + test.perl line 36 STA
      Which is strange, because when I execute it on PostgreSQL it gives:
      <- fetchrow_arrayref= ( [ 'STARTEND' ] ) [1 items] row1 at pgtest.pe +rl line 36 STARTEND
      Is it a Unicode problem?

        cast(<whatever> as string) is not valid postgres.

        You probably want to cast( ... as text).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found