这个语句应该怎么用inner join?
create table #dbfTable
(code int , [open] decimal)
insert into #dbfTable
(code , [open])
select code , [open]
from openrowset
( 'msdasql ', 'driver=microsoft visual foxpro driver;sourcetype=dbf;sourcedb=D:\qh(1) ', 'select * from [all.dbf] ')
inner join all_code on #dbfTable.code = all_code.code
我加了最后一个inner join就报错了应该如何写这个语句??
[解决办法]
你的表是空的,你是往裡面插入數據,不需要inner join
create table #dbfTable
(code int , [open] decimal)
insert into #dbfTable
(code , [open])
select code , [open]
from openrowset
( 'msdasql ', 'driver=microsoft visual foxpro driver;sourcetype=dbf;sourcedb=D:\qh(1) ', 'select * from [all.dbf] ')