Couldn't find the answer on EE with a search, so here goes:
This concerns a search for SQL Server T-SQL code to use in a SQL Server 2014 EXPRESS (pay attention! I said SQL Server EXPRESS!) database stored procedure.
I want to export the results of a view (which puts all the fields in the proper varchar format) to a pipe-delimited csv file, including the column names.
This usp will be run by non-sysadmin users.
All I want is simple sample T-SQL code that goes between the "BEGIN" and "END" statements to do this.
Don't worry about inputs, outputs, or variables other than those specific to you sample code.
Don't read between the lines or make this harder than it needs to be - KISS.....