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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure for Exporting Text 1

Status
Not open for further replies.

Bruce92318

Programmer
Jun 4, 2000
2
US
I am a SQL Server newbie, and really need help with this project. I have tried and tried, but can't figure out the syntax for this. I know I have to DO ALL THIS IN ONE STORED PROCEDURE which will:

1. Preformat the data. (one Select statement)
2. Store preformatted data in a table. (one Select Into statement)
3. Export data to a text file.

I need to export the Job's table in the Pubs database to a text file with the following format:

job_id 1-2 size = 2 bytes
job_desc 3-52 size = 50 bytes
min_lvl 53-54 size = 1 byte
max_lvl 54-55 size = 1 byte

This data has to be preformatted, variable size character, so now you have to put in more
padding to account for any additional space.

Any help greatly appreciated.

Thanks in advance,
Bruce



[sig][/sig]
 
Bruce, you should look at using DTS for this. Once you've defined the DTS package, you'll be able to schedule it or run it on demand. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top