Why Doesnt This Return the Case Value
Posted by:
claudeless
Date: April 30, 2005 08:14PM
ANY Help would be great
SELECT
`assets`.`MasterCusID` AS `MID` ,
`assets`.`CurrentVersion` AS `VER`,
`assets`.`Orginal AssetType` AS `TYPE`,
classofsoftware.Catagory AS CAT,
classofsoftware.`CatDesciption` AS `Description`,
`assets`.`Orginal MODEL_NO` AS `Model`,
`assets`.`Multi No` AS `QTY`,
SUM( `Multi No`) AS TOTALQTY,
classofsoftware.Level AS Lev,
PriceLevel = CASE
WHEN (SUM(`Multi No`) BETWEEN 2 and 5) THEN 2
WHEN (SUM(`Multi No`) BETWEEN 6 and 10) THEN 3
WHEN (SUM(`Multi No`) BETWEEN 11 and 25) THEN 4
WHEN (SUM(`Multi No`) BETWEEN 26 and 50) THEN 5
WHEN (SUM(`Multi No`) BETWEEN 51 and 100) THEN 6
ELSE 1
END
FROM assets
INNER JOIN `classofsoftware` ON ( `assets`.`Orginal MODEL_NO` = `classofsoftware`.`ModelNo` )
WHERE ( `assets`.`MasterCusID` =20032625 ) AND ( `assets`.`VOIDED` =0 )
GROUP BY `assets`.`CurrentVersion` , `assets`.`Orginal AssetType` , `classofsoftware`.`Catagory`
ORDER BY `assets`.`CurrentVersion` , `assets`.`Orginal AssetType`
Subject
Written By
Posted
Why Doesnt This Return the Case Value
April 30, 2005 08:14PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.