I want to export values from SQL Server to txt file. I know about BCP, there I need to give either query or table name to export data from a table. I don't want to export data but I want to export values that are assigned to variable. How can I do that, any help?I want to export values from SQL Server to txt