If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Question On CLOB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-04, 12:48
modigunta modigunta is offline
Registered User
 
Join Date: Nov 2001
Location: New York
Posts: 8
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
Reply With Quote
  #2 (permalink)  
Old 01-27-04, 12:54
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: Question On CLOB

Quote:
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'?
Reply With Quote
  #3 (permalink)  
Old 01-27-04, 12:58
modigunta modigunta is offline
Registered User
 
Join Date: Nov 2001
Location: New York
Posts: 8
Re: Question On CLOB

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 01-27-04, 13:46
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: Question On CLOB

Quote:
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:
Quote:
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.
Reply With Quote
  #5 (permalink)  
Old 01-27-04, 13:53
modigunta modigunta is offline
Registered User
 
Join Date: Nov 2001
Location: New York
Posts: 8
Re: Question On CLOB

Quote:
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..
Reply With Quote
  #6 (permalink)  
Old 01-29-04, 03:49
Heinz Buehler Heinz Buehler is offline
Registered User
 
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.
Reply With Quote
  #7 (permalink)  
Old 02-27-04, 14:58
ansonee ansonee is offline
Registered User
 
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..."
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On