TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sumit Rajguru
1.3k
408
40k
BCP utility on SQL managed instance.
Nov 23 2018 12:26 AM
Hi all,
I have a function which returns a table.
I am exporting this table to an Excel file using the BCP utility. I want to use this functionality on SQL Managed instance.
Declare @Command varchar(2000)
set @Command = 'bcp "select * from ' + @DatabaseName + '.dbo.TableName order by ColumnX" queryout
"D:\Test\' + @DatabaseName +'_TableData.xls" -c -t" " -r"\n" -S Servername -T -S'
EXEC master.dbo.xp_cmdshell @Command
kindly suggest me the proper way to achieve this task.
All suggestions are appreciated.
Thanks in advance.
Reply
Answers (
1
)
implementing Pagination in sql server
Problem of Order By Clause