biswanath_c has asked for the wisdom of the Perl Monks concerning the following question:

LONG datatype values in Oracle are pretty tough to handle. They do not get displayed in SQL navigator when you run a SELECT query on them. I was wondering if there is some pretty neat way of selecting and dislaying the LONG column data using PERL?

  • Comment on How to read Oracle LONG datatype columns usig PERL?

Replies are listed 'Best First'.
Re: How to read Oracle LONG datatype columns usig PERL?
by ikegami (Patriarch) on Jan 27, 2010 at 06:32 UTC
    There's a whole section on it in the docs. I'm not sure how you missed it
Re: How to read Oracle LONG datatype columns usig PERL?
by mje (Curate) on Jan 27, 2010 at 08:43 UTC

    ikegami has pointed you in the right direction and it is not difficult. All you really need to decide is if you want lobs retrieved automatically for you (ora_auto_lobs) or if you'd prefer the lob locator and retrieve the lob seperately yourself.

    Regarding your comment about not seeing lobs in SQL Navigator I see my clobs with it fine. It shows the first part and if I right click on the row and select "single record view" a box pops up and I can click on the ... in the clob to see it.

      thankd for the reply. but does the ora_lob aspect that you mentioned hold good for LONG datatype also?

        DBD::Oracle says:

        There are also legacy LONG types (LONG, LONG RAW, VARCHAR2) which are presently deprecated by Oracle but are still in use. These LONG types do not utilize a 'LOB Locator' and also are more limited in functionality than CLOB or BLOB fields.

        I misread your question and assumed you meant lobs and not the old deprecated long type. I don't use longs so I cannot say but the comment above would suggest there is not a lob locator.

        I guess you need to read this.