Load fixed length records.

Load fixed length records.

Post by Martin Schweitze » Tue, 27 Feb 2001 23:40:26



This is a multi-part message in MIME format.

------=_NextPart_000_0152_01C09F4B.D206D2C0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi

I am receiving records as fixed length ascii.  I would like to load them in=
to PostgreSQL tables.  I could write an ecpg program to parse the records a=
nd do an insert - or I could write an awk script to split the records and i=
nsert delimiters, then use COPY (which is what I did), but I was wondering =
if there were some generalised tools out there for the task, or if someone =
had a better option?

Thanks.

Martin

------=_NextPart_000_0152_01C09F4B.D206D2C0
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am receiving records as fixed length asc=
ii.&nbsp;=20
I would like to load them into PostgreSQL tables.&nbsp; I could write an ec=
pg=20
program to parse the records and do an insert - or I could write an awk scr=
ipt=20
to split the records and insert delimiters, then use COPY (which is what I =
did),=20
but I was wondering if there were some generalised tools out there for the =
task,=20
or if someone had a better option?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Martin</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0152_01C09F4B.D206D2C0--

 
 
 

1. Question on bulk loading of fixed length/fixed field records

Hi all,

Is there any way using ASE 11.9 to load fixed form, char
data similar to the ASA 6.0 INPUT INTO command with the
COLUMN WIDTHS spec?  I'm new to ASE, and I noticed that
DBISQL has been replaced with ISQL, and the INPUT INTO
command no longer works.  I have looked at the doc for BCP,
but it looks like the fields have to be delimted and the
data I have to import to the database are all fixed field
records.

Thanks for any help anyone can provide.

Dwayne Butler
SPR Inc.

**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****

2. TECHNICAL SUPPORT FOR DEVELOPERS

3. BCP OUT Fixed-Length Record: Truncated Length

4. IIUG Web site DOWN July 8, 1999

5. Text File (fixed-length) to load Table

6. One field to two field

7. Loading Fixed Length ASCII / EBCDIC

8. MS SQL, D2 and DeadLocks

9. load fixed-length text file into database

10. having trouble loading a fixed length file using Bulk Copy (BCP)

11. Parsing a fixed length record file.

12. Pdox5, importing ASCII delimited or fixed length records