Sample query attached
In the above table #temp, I need to query the location field on multiple condition,
Example when i run
select * from
#temp where location=1 and location=2 and location=3
I need three records to be displayed, I know this cannot be achived using the above statement, is there any work arround for this?.
dbtech
Code:
set nocount on
CREATE TABLE #temp
(Location int null)
Insert into #temp values(1)
Insert into #temp values(2)
Insert into #temp values(3)
Insert into #temp values(4)
--select * from #temp
select * from
#temp where location=1 and location=2
drop table #temp
Example when i run
select * from
#temp where location=1 and location=2 and location=3
I need three records to be displayed, I know this cannot be achived using the above statement, is there any work arround for this?.
dbtech