문제

I am reading a spreadsheet which is having 2400 rows. I want to insert all these records to a SQL server table. My client does not want to use bulk insert. Where as batch insert only allows 1000 records at a time.

Anyone please suggest how can I do this?

도움이 되었습니까?

해결책

sp_configure 'show advanced options', 1;
RECONFIGURE;
sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO   


 Insert into [TABLE]
        select * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
        'Data Source=C:\test.xls;Extended Properties=Excel 8.0')...[Sheat1$]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top