| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I wish to parse out an Ingres data copy (with sql db_name < copy.out > file; where "copy.out" is generated with "copydb" command). I wonder could someone advice what's the delimiter and line breaks used in such Ingres copy file, so I can write a perl script to convert data into plain text file? I see irregular "^A" and spaces but can't match up where the line breaks should be, or tell what they are. Or the unix terminal is fooling my eyes ;-) Thanks in advance! Zhiliang |
|
#2
|
| Hi Zhiliang You should use the copydb command with a -c switch. This way you will have an open format file (tab delimited) which is easy to parse. Read the "command & reference" guide for the copydb command and the SQL guide (copy statement) for figuring out what the copy.out file contains (and the text file it builds - especially varchar types etc..) Hope this helps. Gary |
|
#3
|
| On Aug 24, 1:38 pm, ghing...@yahoo.co.uk wrote: > HiZhiliang > > You should use the copydb command with a -c switch. This way you > will have an open format file (tab delimited) which is easy to parse. > Read the "command & reference" guide for the copydb command and the > SQL guide (copy statement) for figuring out what the copy.out file > contains (and the text file it builds - especially varchar types > etc..) > > Hope this helps. > > Gary Thanks Gary, that is useful. However in our case we only have a backup copy from a time point that were saved with copydb without -c switch, and I wish to recover data out of it by parsing it out. I know another way might be that I can create a temporary Database and load it with copy.in script, then export again ... Zhiliang |
![]() |
| Thread Tools | |
| Display Modes | |