Re: Copy Command Error

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Copy Command Error
Дата
Msg-id 200309151101.24985.dev@archonet.com
обсуждение исходный текст
Ответ на Copy Command Error  ("Richard Sydney-Smith" <richard@ibisaustralia.com>)
Список pgsql-sql
On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote:
> I am outputting the following rows from a SYBASE database on W2000

> The problem is that each string is imported with the inverted commas.
>
> eg field ID = ''RK'' instead of 'RK'
>
> Can someone please help?

A short bit of perl. Something like (untested)

perl -pi -e 's/\t"/\t/g' fcont.dat
perl -pi -e 's/"\t/\t/g' fcont.dat

That should pre-process the file. I'm sure someone else on the list will show 
how to do it in sed.

Hmm - just noticed you are on Windows. Not sure what cygwin ships with, or 
whether you have perl installed.
--  Richard Huxton Archonet Ltd


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

Предыдущее
От: "Richard Sydney-Smith"
Дата:
Сообщение: Copy Command Error
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: change a field