Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Location
    chennai
    Posts
    27

    Question Unanswered: 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
    vasu

  2. #2
    Join Date
    May 2002
    Posts
    299
    Take 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
    --
    -oj
    http://www.rac4sql.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •