Not sure if this is the right forum but I need to convert a db2 clob to varchar

  • I am reading multiple databases and creating one HL7 message. one of the database is DB2 it has a clob column And I need to convert it to varchar. I have been successful with using cast but it will only work if the column contains less than 32000 char. So I need to find a way that will work no matter what the size.

    I am doing this with VB. Any help would be appreciated?

    Thanks,

    Jim

  • Do you got problems with VB or SQL.

    I think it is VB because 32000 is a magic number for VB (especially VB6).

    SQL Datatype "VARCHAR(MAX)" can handle this.

    WLengenfelder

  • I ran a test using vbs with a select statement and 32000 was the max. I used the ado connecton and the providor was the IBM driver for ODBC. My problem is what if the data is larger than 32000 how do I convert/get it?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply