Re: Problem with COPY

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Problem with COPY
Дата
Msg-id 20060711081009.GC26967@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Re: Problem with COPY  ("Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de>)
Ответы Re: Problem with COPY  ("Leif B. Kristensen" <leif@solumslekt.org>)
Список pgsql-general
am  11.07.2006, um  9:24:06 +0200 mailte Christian Rengstl folgendes:
> Hi again everyone,
>
> i got it to work, but came across another question concerning COPY. If
> i have a column in a text file that i do not want/need in the
> database, is there a way not to read that column from the file without
> having to edit the file beforehand?
>
> Thanks for your advice!

Do you have a UNIX-like operating system? Then you can use tools like
'cut':

kretschmer@tux:~$ echo "s1,s2,s3" | cut -d ',' -f 1,3
s1,s3

This result can you pipe into psql.


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

В списке pgsql-general по дате отправления:

Предыдущее
От: "Harald Armin Massa"
Дата:
Сообщение: Re: [pgadmin-support] Emergency - postgre is not working
Следующее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: Problem with COPY