10
2012
04

Sql Server数据库导入

直接使用数据库运行导入数据库:
if exists(select * from sysobjects where name='OutsideCall')
delete from OutsideCall
INSERT INTO OutsideCall(TeleNumber)
SELECT convert(varchar(20), convert(bigint,TeleNumber) ) FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel5.0;HDR=YES;DATABASE=***.xls',[Sheet1$]) where TeleNumber not in(select TeleNumber from OutsideCall);"
« 上一篇下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。