Subject | RE: [ib-support] Help with SQL Please |
---|---|
Author | jackie |
Post date | 2003-02-01T01:41:08Z |
Thanks heaps for that pointer Todd.
jackie.
jackie.
> -----Original Message-----
> From: Todd Brasseur [mailto:todd@...]
> Sent: Saturday, February 01, 2003 10:31 AM
> To: ib-support@yahoogroups.com
> Subject: Re: [ib-support] Help with SQL Please
>
>
> You have to remove all the fields except the aggregate (SUM) and the one
> you are grouping by. Or include all the fields but the Aggregate in
> your group by.
>
> Todd
>
> jackie wrote:
>
> > I need some help with this SQL
> >
> > SELECT T.RECID, X.SHORTNAME, T.AMNT, T.TRNID, T.TRNTYPE, Sum(T.AMNT) as
> > TotalAmnt
> > from crtbp T
> > left outer join trntype X ON (X.RECID = T.TRNTYPE)
> > where T.AMNT <> 0
> > GROUP BY T.TRNID
> > ORDER BY T.TRNID ASC
> >
> > What I am trying to do is for each unique TRNID, find the sum
> of the float
> > field AMNT but my SQL results in an "invalid column reference"
> >
> > Thanks for any help.
> > jackie
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> > <http://docs.yahoo.com/info/terms/> .
>
>
> --
> Todd Brasseur, A.M.A.A.
> COMPASS Municipal Services Inc.
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>