Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Swati Jain
Posting Yak Master
139 Posts |
Posted - 2010-01-11 : 08:53:13
|
| select isComplete from task where taskid in (1,2)taskid isComplete1 02 1 I want the output of the query such as i should be able to use bitwise operation on column 'isComplete' (in row values)for row 1 value and row 2 value.I can not use query like select (select isComplete from task where taskid=1) & (select isComplete from task where taskid=2)as parameters can vary each time like taskid in (1,2,3) also.How to manage it? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-11 : 09:41:47
|
do you mean this?DECLARE @Ret intSELECT @Ret=COALESCE(@Ret,1) & isCompleteFROM YourTable WHERE taskid in (1,2,3) SELECT @Ret |
 |
|
|
|
|
|