|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
导入excel到已存在的表中:
INSERT INTO ufdata_001_2015.dbo.rdrecord SELECT * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="D:/abc.xls";
User ID=Adminassword=;Extended properties=Excel 8.0')...rdrecord$
INSERT INTO ufdata_998_2015.dbo.computationunit SELECT * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="D:/abc.xls";
User ID=Adminassword=;Extended properties=Excel 8.0')...computationunit$
表头插入SQL
insert into ufdata_998_2015.dbo.rdrecord (ID,BRDFLAG,CVOUCHTYPE,CBUSTYPE,CSOURCE,CWHCODE,DDATE,CCODE,CDEPCODE,CVENCODE,CMAKER,INETLOCK,CDEFINE7,IMQUANTITY,VT_ID,CDEFINE16)
values(52598,1,08,'其他入库','存货',01,42125,00018974,1,01009,'罗锡清',0,0,0,67,0)
表体插入SQL(插入表体和表头后要在【库存管理】【业务处理】【整理现存现】运行一下,如果数据很多可以用xlstosql来生成sql语句)
insert into ufdata_998_2015.dbo.rdrecords (AUTOID,ID,CINVCODE,INUM,IQUANTITY,IUNITCOST,IPRICE,IFLAG,ITAX,ISQUANTITY,ISNUM,IMONEY,ISOUTQUANTITY,ISOUTNUM,IFNUM,IFQUANTITY,CDEFINE26,CDEFINE27,ISENDQUANTITY,ISENDNUM,INQUANTITY,INNUM)
values(0001,52600,'010101001',0,10,12,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
|
|