Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2001
    Location
    New York
    Posts
    8

    Unanswered: Question On CLOB

    Hi Folks,
    I have a table "create table test_tbl (c1 int, c2 clob(200k))". Some how,it not allowing me to insert more than 32 K. Is there any parameter to set?.
    Thanks
    --chandra

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Question On CLOB

    Originally posted by modigunta
    Hi Folks,
    I have a table "create table test_tbl (c1 int, c2 clob(200k))". Some how,it not allowing me to insert more than 32 K. Is there any parameter to set?.
    Thanks
    --chandra
    What method do you use to insert your data? What kind of error message you get when 'it not allowing me to insert'?

  3. #3
    Join Date
    Nov 2001
    Location
    New York
    Posts
    8

    Re: Question On CLOB

    Originally posted by n_i
    What method do you use to insert your data? What kind of error message you get when 'it not allowing me to insert'?
    Hi!
    I use plain db2 "insert into <table> values(10,'big string')
    I would like to insert "big string" about 200 K. I get following error when i insert more than 32K.

    SQL0102N The string constant beginning with "'blah blah ....'" is too long. SQLSTATE=54002

    Thanks
    --chandra

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Question On CLOB

    Originally posted by modigunta

    SQL0102N The string constant beginning with "'blah blah ....'" is too long. SQLSTATE=54002

    That sort of explains a lot, doesn't it? In case it doesn't, try typing "? SQL0102N" in Command Line Processor. I bet you'll see something like this:
    The string constant beginning with "<string>" has a length
    greater than 32672 bytes. Character strings with lengths greater than 32672 bytes or graphic strings with lengths greater than 16336 characters can be specified only through assignment from host variables. Note that other servers in the DB2 family of products may specify a different size limit for character strings. Consult the documentation for the appropriate DB2 product for details.

  5. #5
    Join Date
    Nov 2001
    Location
    New York
    Posts
    8

    Re: Question On CLOB

    Originally posted by n_i
    That sort of explains a lot, doesn't it? In case it doesn't, try typing "? SQL0102N" in Command Line Processor. I bet you'll see something like this:
    Thank you. I wil try with CLI..

  6. #6
    Join Date
    Jan 2004
    Location
    Zuerich, Switzerland
    Posts
    13
    if you do not want to write a program you might try to use SQL UPDATE to concat a string to the already existing content of the CLOB.
    DB2 SQL can handle long strings, and this method avoids that the CLOB content has to be materialized outside the SQL engine.

  7. #7
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    Heinz:

    I'm having the same problem...could you provide a little more detail on your proposed solution?

    Thanks!
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •