AdamW328 84 posts msg #55876 - Ignore AdamW328 |
10/21/2007 6:05:41 PM
Sorry....forgot to post the syntax....lol
here it is:
SELECT Name, PriceA, PriceB, PriceC, PriceD, Price_1 AS PriceE, Price AS PriceF
FROM FILTER {Price >= Price_1 AND Price <= PriceA}
(FILTER{Price <= 1.1*PriceB} (
SELECT Name, PriceA, PriceB, PriceC, Price_1 AS PriceD, Price
FROM
FILTER{Price >= 0.9*PriceB} (
SELECT Name, PriceA, PriceB, Price_1 AS PriceC, Price
FROM
FILTER{Price >= 0.9*PriceA AND Price <= 1.1*PriceA} (
SELECT Name, PriceA, Price_1 AS PriceB, Price
FROM
FILTER{Price >= 1.2*PriceA} (
SELECT Name, Price_1 AS PriceA, Price
FROM
FILTER {Price < Price_1}
(SELECT Name, Price FROM Stock NEXT {$1.Name=$2.Name} Stock)
FOLD {$1.Name = $2.Name, $2.Price >= $.Price,} Stock)
FOLD {$1.Name = $2.Name, $2.Price <= $.Price,} Stock)
FOLD {$1.Name = $2.Name, $2.Price >= $.Price,} Stock)
FOLD {$1.Name = $2.Name, $2.Price <= $.Price,} Stock)
NEXT {$1.Name = $2.Name}
Stock)
|