0
因此,我提出了一个关于如何摆脱#temp表的问题。如何摆脱SQL Server中的#temp表和CTE
How to get rid of #temp tables
,并得到解决太..但我不希望使用CTE为好。
任何想法,如何将所有这些查询合并为一个。
select {some columns} into #temp1 from {some tables} where {conditions1}
select {some other columns} into #temp2 from {some tables} where {conditions2}
select {some other columns} into #temp3 from {some tables} where {conditions3}
select {some columns from all #temp tables} from #temp1, #temp2,
#temp3 where {conditions}
感谢
洁
没有表脚本,所需的列,WHERE和JOIN条件,我们无法真正帮助 – gbn 2013-04-24 09:37:25
@gbn,完全同意......但我无法真正发布我的查询。谢谢 – Jaikrat 2013-04-24 09:51:08
其实,我已经解决了它......但我也得到了一些其他例外。 – Jaikrat 2013-04-24 09:51:37