Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 MS SQL write help

Author  Topic 

trebian
Starting Member

4 Posts

Posted - 2003-05-08 : 21:30:59
Hello good folks:

I simply need to write the results from a select statement to be written to a txt file. This has to be in a script, which the openview admin. will place in its scheduler (its back end is MS SQL server) to run. He will then ftp that file to me. How do I do that.

For example:
If I have SELECT A, B, C FROM TABLE123 ; I need the result to go to a txt file.

Much thanks,
Tre

The more I learn, the more I realize how less I know!

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2003-05-08 : 21:41:59
Look up BCP in Book on Line (The help file for SQl Server)

DavidM

"SQL-3 is an abomination.."
Go to Top of Page

trebian
Starting Member

4 Posts

Posted - 2003-05-08 : 22:07:29
Hello David. I am embarassed to say that my forte is not SQL server nor I have any access to it either (the admin. being a prick is having me write this-I can do the SQL part ok just the write reult to txt file is the issue).

Any how, is there any other way a link that I could get to this topic?

Much obliged,

Tre

The more I learn, the more I realize how less I know!
Go to Top of Page

scullee
Posting Yak Master

103 Posts

Posted - 2003-05-08 : 22:16:00
You can search MSDN for anything.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_bcp_61et.asp

Or you can download the full books online from
http://www.microsoft.com/downloads/details.aspx?FamilyID=683D71A6-BCF4-45A6-A2E2-F6AB5BE3EF12&displaylang=en

Have a look at the query out part.

I hope this helps


Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-05-08 : 22:19:25
Take a look

http://www.sqlteam.com/item.asp?ItemID=4722
http://www.sqlteam.com/item.asp?ItemID=744

Go to Top of Page

trebian
Starting Member

4 Posts

Posted - 2003-05-09 : 17:06:01
Well good folks, thank you so very much for your help. I have written what I learned from the articles.

Much thanks,

Tre

The more I learn, the more I realize how less I know!
Go to Top of Page
   

- Advertisement -