Subject Re: [ib-support] Help with SQL Please
Author Abdullah KAYAALP
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.RECID, X.SHORTNAME, T.AMNT, T.TRNID,T.TRNTYPE
> ORDER BY T.TRNID ASC


try this :))
----- Original Message -----
From: Nicorici Marcel
To: ib-support@yahoogroups.com
Sent: Friday, February 07, 2003 12:47 PM
Subject: Re: [ib-support] Help with SQL Please



--- jackie <jackieg@...> 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
>
>
>
Hi

Note that SQL GROUP BY must contain all the fields in
select statement witch are not in statistical
functions(like sum, max, min ...)

Ciao

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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.



[Non-text portions of this message have been removed]