Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send from stored procedure to a csv file

Status
Not open for further replies.

teqmem

Programmer
Nov 26, 2004
114
US
Hello,

I'm a newbie to Sybase database and was given a task to extract data from remote database using a stored procedure.

I can connect to this remote server and can run the stored procedure using to display the selected records on the screen. My ultimate goal is to capture the data extracted by this stored procedure and load it into our local Oracle database.

My question is how do I run isql and the stored procedure and send the output to a CSV file. I'm just a guest on the remote server so I can't make any changes.

Thank you.
 
Well, if you can't make any changes in Sybase,
I suggest using a perl script to do this.

Just connect using a perl script, execute the stored procedure, fetch the result set into variable, format the variables using required delimiters (a ',' in this case) and store the result in a file.

Hope this helps
 
Could you share some sample code on how to connect to the DB with Perl?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top