1
SQL Server 2005 - 如何以编程方式将查询结果保存到文本文件? (即没有选择Analyzer中的Results to file选项而不是通过sql命令)?如何以编程方式将查询结果保存到文本文件?
例如
select * from northwind.dbo.suppliers
我救我的结果到CSV文件?
SQL Server 2005 - 如何以编程方式将查询结果保存到文本文件? (即没有选择Analyzer中的Results to file选项而不是通过sql命令)?如何以编程方式将查询结果保存到文本文件?
例如
select * from northwind.dbo.suppliers
我救我的结果到CSV文件?
在您所选择的语言
Open a SQL Connection
Issue command (select)
While not end_of_results
for each column
write column value
write ','
write new line
Clean up connection