Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Ingres Topics / August 2008

Tip: Looking for answers? Try searching our database.

parse copy.out output as plain text?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zhiliang Hu - 23 Aug 2008 03:04 GMT
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
ghingres@yahoo.co.uk - 24 Aug 2008 19:38 GMT
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
Zhiliang Hu - 28 Aug 2008 21:42 GMT
On Aug 24, 1:38 pm, ghing...@yahoo.co.uk wrote:
> HiZhiliang
>
[quoted text clipped - 8 lines]
>
> 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 db and load it with copy.in script, then export
again ...

Zhiliang
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.