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!

Query results in ANSI

Status
Not open for further replies.

Dimitrie1

Programmer
Jan 5, 2007
138
CA
I need to store the results of a query in a fixed length ANSI text file. I'm using SQL2005.
Any ideas ?

I know I can do a SaveAs on the file but I need to run this daily for 6 months and am trying to automate as much as possible.
 
Simply create a jobstep and save the query results to a text file.

The default seems to be a fixed width column.
 
what is a jobstep?

I did determine that I can choose ANSI when saving but I'm trying to automate as much as possible
 
JobSteps are part of what the "SqlAgent" does.
It allows you to create multiple automated jobs that run based on a schedule. Usually it is used to run automated backups and scheduled maintanence jobs. Howerver it is also usefull for what you are describing also.

In Management Studio, it is the thing at the bottom.
 
oh okay - you were referring to scheduled jobs.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top