Carol,
Thanks I used sqlcmd (since that is the new replacement for osql) to
call the select and produce the output. I then saved this as a .cmd and
then referenced it via xp_cmdshell
Jeff
-----Original Message-----
From: Carol Green
[mailto:mssqldba-ezmlmshield-x6125647.[Email address protected]
Sent: Tuesday, February 27, 2007 11:58 AM
To: LazyDBA Discussion
Subject: RE: Now the export...
Have you thought about osql?
You could create a file with the osql query and execute via
xp_cmdshell...
-----Original Message-----
From: Sheldon Jeff
[mailto:mssqldba-ezmlmshield-x88494569.[Email address protected]
Sent: 27 February 2007 16:54
To: LazyDBA Discussion
Subject: Now the export...
Created a stored procedure to eliminate a file conversion process that
was done by several .cmd files and a customized access database.
I have xp_cmdshell for the .cmd files and have used BULK INSERT command
to input the data from file into SQL server.
Now that I have massage the data to my likening in the table, I want to
export out the data into a tab delimited file.
I want to do this within the stored procedure and not through a DTS
command as my users will access this sp from our ERP window.
I read the section Export query data to file section in BOL but it talks
about bcp utility tool...looking for suggestions...
Jeff
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
This email and any files transmitted within it are private and
confidential.
If you are not the intended recipient, this email and any attachments
within it have been transmitted to you in error.
You are prohibited from using, copying, distributing or otherwise using
the information contained within this email.
Nothing in this email message amounts to a contractual or legal
commitment on the part of Optilan unless confirmed by a communication
signed on behalf of the company.
Any email cannot be guaranteed to be secure, error free or free from
viruses. Although every possible care is taken by Optilan, Optilan does
not accept any liability whatsoever for any loss or damage which may be
caused as a result of the transmission of this message by email.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page