For SQLSERVER use the bcp utility.
For Oracle, I would look at the UTL_FILE package.
Regards,
Allan
-----Original Message-----
From: Matthew H. Devlin III [mailto:[Email Address Removed]
Sent: Thursday, April 17, 2003 9:48 PM
To: 'manage data'; [Email Address Removed] [Email Address Removed] RE: common SQL statments for ORACLE/DB2/SQLSERVER
Not sure on oracle and sqlserver but for db2 you can use export to 'del'
(delimited, comma by default) files.
Db2 export to <filename> of del select * (or whatever) from sometable;
This is a very simplified example that assumes you want all the data,
you can review the command reference (available online) for detailed
instructions.
Obviously, these commands would be easily stuck into a perll script. I
have a ton of perl code to run against db2 databases at
www.mattdevlin.net <http://www.mattdevlin.net/> if you want any
examples. Nothing spectacular but it all works.
-----Original Message-----
From: manage data [mailto:[Email Address Removed]
Sent: Thursday, April 17, 2003 5:46 PM
To: [Email Address Removed] [Email Address Removed] Fwd: common SQL statments for ORACLE/DB2/SQLSERVER
Hi Guys
I want to create FLAT FILE from SQLSERVER tables data and DB2 tables.
What is best option we have ?
Basically I want to synchronize two databases (offline synchronization)
and databases may be (SQLSERVER, DB2 , ORACLE) . I was thinking of
writting PERL script which will talk to database (DB2/SQL/ORACLE) and
create FLAT FILE from data. and when Uploading to databases , for Oracle
we have SQLLDR or equivalent for DB2/SQLSERVER.
Another option i was thinking is writting common SQL statements.
Please guide me in this. I donot know anything about DB2/SQLSERVER.
Thanks
PTP
_____
Do you Yahoo!?
The New <http://us.rd.yahoo.com/search/mailsig/*http:/search.yahoo.com>
Yahoo! Search - Faster. Easier. Bingo.
DB2 & UDB email list listserv db2-l LazyDBA home page