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 > Exported field truncated

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-13-06, 07:05
Joshua Lee Joshua Lee is offline
Registered User
 
Join Date: Dec 2005
Posts: 7
Smile Exported field truncated

Hi there,

I issued the following SQL to export data:

echo EXPORT TO D:\eCRM_Black_List_Download\bkblist.del OF DEL MESSAGES D:\eCRM_Black_List_Download\bkblist.log select black_key, input_date, source_code, internal_code, black_list_name, other_number, passport, address, effective_date, expired_date, substr(remark,8), access_control from fos.black_list; >> batch.clp

But the address and remark columns were truncated. If import it to excel with macro process, it will not extract all records.

Please help anyway not to truncate the exported file.
Thank you very much.

Regards,
Joshua
Reply With Quote
  #2 (permalink)  
Old 03-13-06, 10:18
craigmc craigmc is offline
Registered User
 
Join Date: Aug 2003
Location: austin,tx
Posts: 90
You're running an explicit substr function on the remark field. What is the datatype for the fields? Are the CLOBS?
Reply With Quote
  #3 (permalink)  
Old 03-13-06, 20:03
Joshua Lee Joshua Lee is offline
Registered User
 
Join Date: Dec 2005
Posts: 7
Smile

Quote:
Originally Posted by craigmc
You're running an explicit substr function on the remark field. What is the datatype for the fields? Are the CLOBS?
Hi,
The address field is VARCHAR 250 and for remark field is BLOB.
Thank you.

Regards,
Joshua
Reply With Quote
  #4 (permalink)  
Old 03-13-06, 21:46
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
I'm surprised VARCHAR(250) is truncated ... Did you check the exported file in notepad ?? Is is truncated ?

Remember BLOB works on bytes ... So, if you are using DBCS only first 4 characters will be returned by SUBSTR(blobcol,8)

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 03-13-06, 22:47
Joshua Lee Joshua Lee is offline
Registered User
 
Join Date: Dec 2005
Posts: 7
Smile Exported Fields Truncated

Hi sathyaram_s,

I did view through notepad and realised it was truncated.
I suspected if I'm not wrong, there may be some 'carriage return' which caused the trucation.
anyway we can filter off this truncation during exporting??

Please help. Thank you so much.

Regards,
Joshua
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