怎么让他从第一行就开始导入数据,不用去判断第一行(表头)
这是我的:
ALTER PROCEDURE [dbo].[Import]
@FilePath NVARCHAR(200), --eg:'D:\\DATAExchange\\CSVTMP'
@FileName NVARCHAR(100) --eg:'ExportFileOne.csv'
AS
BEGIN
DECLARE @ImpSQLstr NVARCHAR(600)
SET @ImpSQLstr='INSERT INTO TempTable (DataDate,Dataopen,DataHigh,DataLow,DataClose,DataVolume,DataOpenInt)
SELECT * FROM OPENROWSET(''MSDASQL'', '' Driver={Microsoft Text Driver (*.txt; *.csv)};
DEFAULTDIR='+@FilePath+'; Extensions=CSV;'',''SELECT * FROM "'+@FileName+'" '')'
Exec (@ImpSQLstr)
SELECT @@ROWCOUNT
END
------解决方案--------------------
没有深入研究过,帮顶