pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Importation wtih copy generated some wrong registers..
2+ messages / 2 participants
[nested] [flat]

* Importation wtih copy generated some wrong registers..
@ 2004-01-07 13:58 Rodrigo Sakai <rodrigo@2bfree.com.br>
  2004-01-07 18:41 ` Re: Importation wtih copy generated some wrong registers.. Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Rodrigo Sakai @ 2004-01-07 13:58 UTC (permalink / raw)
  To: pgsql-sql


Hi everyone, I need some help please....

I did some importation from a .csv file to a table

(this is a very small piece of the csv file, but i think its good for
the exemple. the pipe "|" is the delimiter for this file)
001|002|30413000000045027612|002
001|002|30410000000218146611|002
001|002|30406000000664389616|002
001|002|30406000000607799814|002
001|002|30406000000664429313|002
001|002|30406000000607767316|002


(and the respective part of the table is)
cod_empresa int4 NOT NULL,
cod_credor int4 NOT NULL,
num_contr varchar(50) NOT NULL,
cod_filial int4 NOT NULL DEFAULT 1


(so, the data on my tables look like this:)
cod_empresa | cod_cliente |       num_contr       | cod_filial
-------------+-------------+-----------------------+------------
           1 |        9386 | 30410000000762732212  |          3
           1 |        7383 | 3,04100000007634E+019 |          4
           1 |        5750 | 30410000000763546413  |          3
           1 |        3584 | 3,04100000007627E+019 |          6

altough the data on the 'num_contr' column is not exatly the same in the
csv file described above, it ilustrates how the data is being stored on
my table. So my question is, why is it storing some exponential numbers
(rows number 2 and 4) instead of a string???? if you look in the
definition of the table above, the column 'num_contr' is a varchar(50)!
So, what is happening?????

Thanks for any help!!! 


=====================
Rodrigo Sakai
Analista Programador
rodrigo@2bfree.com.br
http://www.2bfree.com.br
Tel:  (55) (11) 5083-5577
Fax: (55) (11) 5549-3598
=====================




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Importation wtih copy generated some wrong registers..
  2004-01-07 13:58 Importation wtih copy generated some wrong registers.. Rodrigo Sakai <rodrigo@2bfree.com.br>
@ 2004-01-07 18:41 ` Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2004-01-07 18:41 UTC (permalink / raw)
  To: Rodrigo Sakai <rodrigo@2bfree.com.br>; pgsql-sql

Rodrigo Sakai wrote:
> I did some importation from a .csv file to a table
>
> (this is a very small piece of the csv file, but i think its good for
> the exemple. the pipe "|" is the delimiter for this file)
> 001|002|30413000000045027612|002
> 001|002|30410000000218146611|002
> 001|002|30406000000664389616|002
> 001|002|30406000000607799814|002
> 001|002|30406000000664429313|002
> 001|002|30406000000607767316|002
>
>
> (and the respective part of the table is)
> cod_empresa int4 NOT NULL,
> cod_credor int4 NOT NULL,
> num_contr varchar(50) NOT NULL,
> cod_filial int4 NOT NULL DEFAULT 1
>
>
> (so, the data on my tables look like this:)
> cod_empresa | cod_cliente |       num_contr       | cod_filial
> -------------+-------------+-----------------------+------------
>            1 |        9386 | 30410000000762732212  |          3
>            1 |        7383 | 3,04100000007634E+019 |          4
>            1 |        5750 | 30410000000763546413  |          3
>            1 |        3584 | 3,04100000007627E+019 |          6

This result has mighty little to do with what you are importing, so 
you're either looking at the wrong table or you have some triggers that 
do heavy massage on your data.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-01-07 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-01-07 13:58 Importation wtih copy generated some wrong registers.. Rodrigo Sakai <rodrigo@2bfree.com.br>
2004-01-07 18:41 ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox