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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-08-14 : 13:34:16
|
Nancy writes "In the following statement &STFR = 2001 &MOTO = 2001 &STFR = 7 &MOTO = 8This is giving a zero in this statement. How can I say -- when zero then one -- within the case statement? COUNT(*) / CASE WHEN YEAR(&STFR) = YEAR(&MOTO) THEN MONTH(&STFR) - MONTH(&MOTO) + 1 ELSE 6 + MONTH(&MOTO) END AS AVG_YTD_POL Thanks!" |
|
|
|
|
|