Results 1 to 2 of 2

Thread: EASY!!!! I'M SURE ONE OF YOU GURUS CAN ANSWER!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32

    Talking

    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????

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32

    Thanks Anyway...Figured it out....

    You can use CAST to convert bit datatype to an Integer datatype in the Group By clause and it works.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width