Aug 7, 2007 #1 Tapew0rm Technical User Jan 25, 2002 13 US Hi, Ok this should be easy but I obviously woke up on the stupid side of the bed. Here is what i'm tring to do basicly... AVG (( Case When X = Y Then 1 Else 2) - (1)) End as Field_Name, I keep getting incorrect syntax near ')'
Hi, Ok this should be easy but I obviously woke up on the stupid side of the bed. Here is what i'm tring to do basicly... AVG (( Case When X = Y Then 1 Else 2) - (1)) End as Field_Name, I keep getting incorrect syntax near ')'
Aug 7, 2007 1 #2 AlexCuse Programmer Apr 13, 2006 5,416 US Code: avg( Case When X = Y Then 1 Else 2 - 1 End) as Field_Name Your ENTIRE case statement needed to be within the paren's. Hope this helps, Alex [small]----signature below----[/small] I don't do any programming whatsoever Ignorance of certain subjects is a great part of wisdom Upvote 0 Downvote
Code: avg( Case When X = Y Then 1 Else 2 - 1 End) as Field_Name Your ENTIRE case statement needed to be within the paren's. Hope this helps, Alex [small]----signature below----[/small] I don't do any programming whatsoever Ignorance of certain subjects is a great part of wisdom