Skip site navigation (1) Skip section navigation (2)

Parser function / command ?

From: Aarni Ruuhimäki / Megative Tmi / KYMI(dot)com <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Parser function / command ?
Date: 2002-06-28 09:57:05
Message-ID: 20020628095902.KPOQ5242.fep08.tmt.tele.fi@there (view raw or flat)
Thread:
Lists: pgsql-novice
Hi Folks !

Is there a way to parse, within pgsql, a .csv file coming from MS-SQL so that 
it could be read into a table with COPY ?

The file has too many line breaks like and #-character marking the actual 
line break:

prod_id;prod_name;EAN;xxx;xxx;xxx;

 - prod description
 - prod description#
prod_id;prod_name;EAN; ...#

How could this be parsed to look like this:

prod_id;prod_name;EAN;xxx;xxx;xxx; - prod description - prod description#
prod_id;prod_name;EAN; ...#

Any hints and advice much appreciated.

BR,

aarni







pgsql-novice by date

Next:From: Ludwig LimDate: 2002-06-28 10:51:40
Subject: Re: DISTINCT and COUNT help
Previous:From: Manfred KoizarDate: 2002-06-28 09:24:50
Subject: Re: DISTINCT and COUNT help

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group