[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Break Logic ????
- Subject: Re: Break Logic ????
- From: Mark Johnson <markj@AIMNET.COM>
- Date: Wed, 7 May 1997 00:23:29 -0700
Allen,
Let's see the query. This main select should have the group by on
it (Product, Product Name, Product Plan). Subqueries shouldn't be a
problem. You do of course also want to have Product and Product Name with
on-breaks.
Mark
At 01:10 AM 5/7/97 -0400, you wrote:
> I have the following data which is created by a main select which
> branches off to many subselects
>
> before:
>
> Product Product Name Product Plan Amount
> Car Camry 2-door 100
> Car Camry 2-door 300
> Car Camry 4-door 400
> Car Camry 4-door 500
> Car Camry 4-door 600
> Truck Jeep 2-door 200
> Truck Jeep 2-door 300
> Truck Jeep 4-door 400
> Truck Jeep LE 4-door 600
>
>
> I would like the formatted output to be:
>
> Product Product Name Product Plan Amount
> Car Camry 2-door 400
> 4-door 1500
> Truck Jeep 2-door 500
> 4-door 400
> Jeep LE 4-door 600
>
> I tried using the on-break,{I have not tried the after/before to
> calculate the totals}, but it prints a line for the repeating items, I
> know I can use a hack by inserting these values into a temporary table
> and use sql "group by's" to get the results and then formatted in sqr.
>
> any suggestions.
>
> thanks.
>
>