if not exists(select stationNum from @name1 where stationNum=@stationNum and stationDate=@time)
begin
....................
end
因为◎name1是动态生成的,必须用参数。请问怎么实现
declare @command varchar(1000)
set @command = 'select stationNum into #temp from '+ @name1 + ...............
execute(@command)
if not exits(select * from #temp)