dbTalk Databases Forums  

copy command truncate data

comp.databases.postgresql comp.databases.postgresql


Discuss copy command truncate data in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pauls@computer-systems.com
 
Posts: n/a

Default copy command truncate data - 04-13-2007 , 10:22 AM






is it possible to have the copy command truncate character data when
the data is too long to fit in the field? For example field
description1 is 19 char long in table. But there is 20 char in the
load file.
Thanks
Paul


Reply With Quote
  #2  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: copy command truncate data - 04-16-2007 , 01:37 AM






begin pauls (AT) computer-systems (DOT) com schrieb:
Quote:
is it possible to have the copy command truncate character data when
the data is too long to fit in the field? For example field
As far as i know: no.

Quote:
description1 is 19 char long in table. But there is 20 char in the
load file.
Load the data in a temp. table with text instead char(19) and use
substring() or similar to INSERT the data from this table to the
destination.


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.