<script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
insert into 表1(列1,列2...) select * from | select 列1,列2 into 表 from
openrowset('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;database=c:/aaaa.xls;HDR=Yes;IMEX=1', sheet1$)
imex=1是表示把混合數據類型強制轉換爲文本行
--導入已經存在的表中
insert into 表
select * from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;DATABASE=c:/test.xls',sheet1$)
--導入並生成表
select * into 表 from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;DATABASE=c:/test.xls',sheet1$)
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=517825