Export the results of a view to a pipe-delimited csv file, including the column names

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.....
Thanks.
LVL 5
Mark EdwardsChief Technology OfficerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark WillsTopic AdvisorCommented:
Is it Express "With Advanced Services" ?

In which case, let's try at a command prompt  C:\  BCP -v

And see what version, or, if there are issues.

There are a couple of possibilities, but let's try the obvious first. Have you used BCP before ?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark EdwardsChief Technology OfficerAuthor Commented:
No.  I'm use to using Access front-end to do exports to csv, but I want to use a usp this time to increase my skills in t-sql.  Not sure about "advanced services".  I'll have to ask....
0
Mark EdwardsChief Technology OfficerAuthor Commented:
My dba says we have ad. services, if this helps....
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Mark EdwardsChief Technology OfficerAuthor Commented:
@Mark:  I'm testing BCP now.  I found a great explanation and samples in the "SSIS" chapter of a book titled "Microsoft SQL Server 2014 Unleashed".  
My problem with trying to work out solutions for things like this is due to my inability (or so t seems) to boil-down complex syntax explanations into the (seemingly) simple solution that I'm looking for.
One of the problems with the internet is that you can type a little bit of text, then make a bunch of links to other references that provide all the other pieces, that, hopefully, give you what you're looking for if you have the time and expertise to slog through it all.... :-(

Thank goodness for books!!!!!
0
Mark WillsTopic AdvisorCommented:
>> Testing BCP now

Good to see

>> Thank goodness for books!!!!!

Absolutely :)
0
Mark EdwardsChief Technology OfficerAuthor Commented:
OK!  I'll wrap things up by closing this out.  Thanks Mark W.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.