1

i want to take the data from select query to txt or csv formate with comma separated in sql server 2008

2
  • @YogeshSharma SET bcpCommand = 'bcp "select * from table_name" queryout ' SET FilePath = 'C:\file\bcp\' SET OutputFile = 'new.txt' SET bcpCommand = bcpCommand + FilePath + OutputFile + ' -S servername -U username -P password' exec master..xp_cmdshell bcpCommand Error = [Microsoft][SQL Server Native Client 10.0]Unable to open BCP host data-file at the rate im missing because of it is considering as user... Nov 3, 2017 at 8:20
  • Use this post , explains BCP command stackoverflow.com/questions/44606889/…
    – Ven
    Nov 3, 2017 at 8:49

1 Answer 1

0

You Can use SSIS if this is going to be a scheduled or repeating requirement. But If this is just a one-time requirement then probably the Import Export Wizard that comes along the SSMS will be enough.

Check The Below Links :

Using SSIS

Using Import Export Wizard

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.