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 > CLOB help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-04, 04:52
deity_me deity_me is offline
Registered User
 
Join Date: Feb 2004
Posts: 7
Angry CLOB help

Hi
I tried making a table
create table test (number int, mytext clob)

and tried inserting a tuple into it
insert into test(number, mytext) values( 4, 'lalala')

my problem is that it seems mytext is padded cause when I do a
select * from test where number = 4
I get a LOT of blank lines before it tells me there was 1 record selected.

Can anyone help me out with this padding issue
I dont want to use varchar because i dont know exactly how much space i'm going to need - trying to make a message board. CLOB is the closest thing i can get to a text datatype (from MySQL)
Reply With Quote
  #2 (permalink)  
Old 05-05-04, 04:57
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You can use RTRIM function ...

But, remember to increase dbm cfg UDF_MEM_SZ

db2 update dbm cfg using UDF_MEM_SZ 1024

1024 is just an example
HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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