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 |
tpiazza55
Posting Yak Master
162 Posts |
Posted - 2008-08-07 : 10:23:50
|
how do i take the max of a bit field |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-08-07 : 10:27:18
|
cast it as an INT (or similar) maybe?Em |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-07 : 10:33:23
|
orselect max(bit_col+0) from your_tableMadhivananFailing to plan is Planning to fail |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-08-07 : 10:35:57
|
from OP on duplicate post...quote: Originally posted by tpiazza55 when i go max(cast(ready as integer) and i try to pull the value I get "ready" not in table
Em |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-07 : 10:39:06
|
quote: Originally posted by elancaster from OP on duplicate post...quote: Originally posted by tpiazza55 when i go max(cast(ready as integer) and i try to pull the value I get "ready" not in table
Em
It means the column name is not correctMadhivananFailing to plan is Planning to fail |
 |
|
tpiazza55
Posting Yak Master
162 Posts |
Posted - 2008-08-07 : 10:39:21
|
thanks -- posted it tiwcemax(cast(ready as int) as ready got me what i needed |
 |
|
|
|
|