Re: Error con el COPY ???????????

From: "Guillermo Munoz" <munozgb(at)gmail(dot)com>
To: "MIGUEL CANCHAS" <mcanchas(at)tsr(dot)com(dot)pe>
Cc: "pgsql-es-ayuda(at)postgresql(dot)org" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Error con el COPY ???????????
Date: 2008-03-12 18:09:28
Message-ID: 771dbfbd0803121109j314b8656k8740eab520be332e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El 12/03/08, MIGUEL CANCHAS <mcanchas(at)tsr(dot)com(dot)pe> escribió:
> Gracias ya lo corregi poniendo \N cuando esta vacio o nulo.
>
> Ahora no me deja, pasar la Ñ, a pesar de que le cambie el set
> cliente_encoding=latin1
>
> Miguel

al copy que ya tienes agregale NULL AS 'null string' donde 'null
string' es tu fecha nula
ej COPY vihilos1 FROM 'C:\\vi.txt' DELIMITER '\t' NULL AS '';
suponiendo que tu fecha nula sea vacio

cuando ejecutas el copy lo haces siempre con la sentencia set
cliente_encoding? y asi no te toma las ñ?

>
> -----Mensaje original-----
> De: MIGUEL CANCHAS
> Enviado el: Miércoles, 12 de Marzo de 2008 12:03 p.m.
> Para: 'Guillermo Munoz'; MIGUEL CANCHAS
> CC: pgsql-es-ayuda(at)postgresql(dot)org
> Asunto: RE: [pgsql-es-ayuda] Error con el COPY ???????????
>
>
> ----Mensaje original-----
> De: Guillermo Munoz [mailto:munozgb(at)gmail(dot)com]
> Enviado el: Miércoles, 12 de Marzo de 2008 11:58 a.m.
> Para: MIGUEL CANCHAS
> CC: pgsql-es-ayuda(at)postgresql(dot)org
> Asunto: Re: [pgsql-es-ayuda] Error con el COPY ???????????
>
>
> > Ya lo corregi cambiando a MDY.
> >
> > Ahora tengo otro problemita.
> >
> > Como hago para pasar una fecha vacia ? podria ponerla en NULL, pero cuando
> > lo mando a txt me sale vacio.
> >
> > Miguel
> >
>
> probaste con NULL AS 'null string'
>
> te dejo el link
> http://www.postgresql.org/docs/8.3/interactive/sql-copy.html
>
> --
> Saludos
> Guillermo Muñoz
>
>
> Tendrias un ejemplito, please. Aqui no tengo internet, hasta las 5 de la
> tarde.
>
> Miguel
>

--
Saludos
Guillermo Muñoz

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message MIGUEL CANCHAS 2008-03-12 18:11:08 RE: Error con el COPY ???????????
Previous Message Abdelkader Boudih 2008-03-12 18:02:54 Re: OT: Mensajes de pgAdmin III