JameMeck
asked on
MS SQL 2005 merge data.
A = 1
B = 3
select * from myTable where myColumn = A.
--> return 2 record:
0.080
0.097
select * from myTable where myColumn = B
--> return 1 record:
0.234
How can I merge them into 1 data table:
0.080
0.097
0.234
I don't want to use this query:
select * from myTable where myColumn = A or myColumn = B.
Please help me.
B = 3
select * from myTable where myColumn = A.
--> return 2 record:
0.080
0.097
select * from myTable where myColumn = B
--> return 1 record:
0.234
How can I merge them into 1 data table:
0.080
0.097
0.234
I don't want to use this query:
select * from myTable where myColumn = A or myColumn = B.
Please help me.
I meant OR
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select * from myTable where myColumn in (A,B).
>I don't want to use this query:
why not?
you might want to read this article:
https://www.experts-exchange.com/A_1536.html
why not?
you might want to read this article:
https://www.experts-exchange.com/A_1536.html
select * from myTable where myColumn in (A, B)
If you do not mind me asking, why you do not want to use AND?