insert into #t exec [acwh].dbo.[ud_GetStoreSale] '2014-05-01','2014-08-01'
由于数据库名字(acwh)是参数,只能用字符串拼接,要怎么做啊
------解决思路----------------------
DECLARE @sql VARCHAR(MAX)
SET @sql='拼接字符串'
EXEC(@sql)
------解决思路----------------------
insert into #t EXEC('exec '+'[acwh]'+'.dbo.[ud_GetStoreSale] ''2014-05-01'',''2014-08-01''')