Monday, March 26, 2012

Export Data from Tables to Files Using Procedures

Hi

Having small query

How can i able to Export Data from Tables to Specific Local files using Procedures?

Environment Details

OS : Windows 2000 server
Database : MS-SQL Server

Solutions are needed asap.

Thanks in advance

cheers
vasuTake a look at bcp/osql in sql book online.

e.g.

declare @.sql nvarchar(1000)

set @.sql='bcp "Northwind..Orders" out "c:\Orders.txt" -w -T -S"' + @.@.servername + '"'

exec master..xp_cmdshell @.sql

No comments:

Post a Comment