Skip to Content
avatar image
Former Member

Selecting SQL server varchar(max) into datawindow?

Can you exceed the 32k max for a character column? I've seen reference to select blob... but I'd like an example. :)

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jan 11, 2017 at 08:31 PM

    Hi Matt;

    Have you looked int using the new DW's TableBLOB feature for this that was introduced into the newer PB Versions?

    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 02, 2017 at 08:10 PM

    Well I handled my situation like this.

    I am selecting information from a SQL Server database which has a varchar(max) column. Creating a datawindow in PB converts these into a char(8000). For probably 90% of the time this is sufficient. For the other times I save the data into another table, use a second datastore to select against the same record set but looking for fields where the varchar(max) column exceeds the 8000 limit, then I loop through these records and create a dynamic cursor for each and select the varchar(max) field into a string variable. I then update the corresponding record with the string variable.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 07, 2017 at 01:56 PM

    I believe I have retrieved 1,000,000 chars before, it does slow down though. You can create the datawindow then edit the source and change the length of the field to whatever you want (I think, it's been a while!)

    Add comment
    10|10000 characters needed characters exceeded