PDA

Click to See Complete Forum and Search --> : EASY!!!! I'M SURE ONE OF YOU GURUS CAN ANSWER!


AngelaMicikas
Nov 9th, 2000, 07:42 AM
SELECT adl.ReviewIDY,
adl.ReviewADLIDY,
adl.ADLCode,
rs.selectedind,
sum(rs.points * rs.weight)as Score
FROM ReviewADL adl, ReviewService rs
WHERE adl.ReviewIDY = 2 and rs.selectedInd = 1
and rs.ReviewADLIDY = adl.ReviewADLIDY
GROUP BY adl.ReviewIDY, adl.ReviewADLIDY, adl.ADLCode,rs.selectedind

I need to put rs.selectedind in the select statement however when I do I get a message that states:

"Column 'rs.selectedind' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."

When I put it in the Group By clause I get:

"Cannot group by a bit column."

Does anyone know a way around this issue????

AngelaMicikas
Nov 9th, 2000, 09:28 AM
You can use CAST to convert bit datatype to an Integer datatype in the Group By clause and it works.