[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: See data



Hi Fatima,
On what basis R U picking up the date and the amount. What I mean to ask is
how many tables contain the information reqd. and how are they related.
eg. : May be Id. would ba a common column in 2 tables, 1 where U R getting
the descr. and the other date and the amount. If U could give us more info.
probably V could give U more apporpriate soln.

*-*-*
You mentioned that U require the total amount. The best way is to include
this in U'r BEGIN-SELECT statement itself.

eg.
BEGIN-SELECT
ID           &Id
Description  &Descr
Date         &Date
Sum(Amount)       &Tot_Amt


>From <whatever tables>
Where <whatever clauses>
Group by Id, Description, Date
END-SELECT


All the best.
Manoj



>From: Fatima Bagaria <FatimaB@LIMON.CO.ZA>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: See data
>Date: Thu, 6 Apr 2000 18:01:01 +0200
>
>Hi all
>
>Please help!!
>I'm new at this as the following will show:
>
>This is a list of records I need to print, BUT I only need to print the
>amount once the date changes.
>
>
>
>        ID               Description                          Date
>Amount
>  <<...>>
>
>group by clauses,
>if $ID <> &ID
>  Let #ind = x
>and on-break command have proven useless.
>It's obvious that a total needs to be calculated for records with the same
>ID, Description and date.
>BUT HOW???
>
>All help in securing my job sincerely appreciated..

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com