when I use the Sum case on a date field I get an error, cannot convert nvarchar to int. Here is the code.
SUM(CASE WHEN d.dat_val_dt = '2005-08-03' THEN 1 ELSE 0 END)AS TOTSPH
Any ideas?
Thank you,
Moe-King of the Village Idiots.
"When in trouble,
when in doubt;
Run in circles-
SCREAM & SHOUT!!"
Burma Shave
SUM(CASE WHEN d.dat_val_dt = '2005-08-03' THEN 1 ELSE 0 END)AS TOTSPH
Any ideas?
Thank you,
![[king] [king] [king]](/data/assets/smilies/king.gif)
"When in trouble,
when in doubt;
Run in circles-
SCREAM & SHOUT!!"
Burma Shave