L
Lars Netzel
This code works:
SELECT * INTO #Temp From tbl_employee
SELECT * FROM #Temp
Drop TABLE #temp
This does not:
SELECT * INTO #Temp From (Select * FROM tbl_employee WHERE EMP_ID = @id
UNION Select * FROM tbl_employee2 EMP_ID = @id)
SELECT * FROM #Temp
Drop TABLE #temp
I need to get everything from a UNION select statement and I also need to
pass parameters to it so I can't use a view for this.
Is there any other way to make this work?
best regards/
Lars Netzel
SELECT * INTO #Temp From tbl_employee
SELECT * FROM #Temp
Drop TABLE #temp
This does not:
SELECT * INTO #Temp From (Select * FROM tbl_employee WHERE EMP_ID = @id
UNION Select * FROM tbl_employee2 EMP_ID = @id)
SELECT * FROM #Temp
Drop TABLE #temp
I need to get everything from a UNION select statement and I also need to
pass parameters to it so I can't use a view for this.
Is there any other way to make this work?
best regards/
Lars Netzel