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 |
|
msa969
Starting Member
13 Posts |
Posted - 2002-02-26 : 13:58:22
|
| I have a table with a column called numbers.This has random numbes. How would I test if the number is even or odd in sql. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-26 : 14:12:56
|
| SELECT CASE Numbers % 2 WHEN 1 THEN 'Odd' ELSE 'Even' END Odd_EvenFROM myTable |
 |
|
|
|
|
|