EXEC Master.. xp_cmdshell ' bcp ' select Class_no,kind_no,cn_name from New_ks.dbo.kind order by 1,2 "queryout" E:\test3.xls "-c-q-S" Spro Gram "-U" develop "-P" "12345"
(2)/** Import text file
--Into SQL Server
SELECT * into your table from OpenRowset (' msdasql ', ' Driver={microsoft Text Driver (*.txt; *.csv)};D efaultdir=c:\temp; ', ' Select * FROM Contact.txt ')
--The inquiry leads
EXEC Master.. xp_cmdshell ' bcp ' select Class_no,kind_no,cn_name from New_ks.dbo.kind order by 1,2 "queryout" E:\TX1.txt "-c-q-S" sprogr Am "-U" develop "-P" 12345 "'
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.