Subject | Re: [firebird-support] [Qry][Err:-206]Column does not belong to referenced table |
---|---|
Author | Andrea Raimondi |
Post date | 2006-02-08T21:34:13Z |
Ann W. Harrison wrote:
> I think you don't understand what group by means in SQL. WhatI use it very rarely, indeed, thus it's possible.
> you're asking for, I think, is ordering. Do you get what youIt still cries on AvgRate not being in the referenced table... sigh..
> want with this query?
>
> select msgs.*,
> (select avg (rtg.ratingvalue) from messagesratings rtg
> where rtg.message_id = msgs.message_id) as AvgRate
> from Messages msgs
> order by AvgRate
> I greatly prefer to see the actual list of fields from theYou can see them in the first message( I posted the DDL ).
> messages table, but ... In any even, if you use aliases, use
> them consistently. Firebird V2 insists on that point.
> Regards,Cheers,
> AnnAndrew