View Single Post
  #5 (permalink)  
Old June 24th, 2003, 10:23 PM
cej2583 cej2583 is offline
Authorized User
 
Join Date: Jun 2003
Location: Brentwood, TN, USA.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

An Error Occurs and says that CASE is not supported

Thanks!!!

Eric

Quote:
quote:Originally posted by David Cameron
 Is this what you want?

Code:
SELECT 'MA01' AS Entity, dbo.LabVols_MA00.Code AS Simmcode, 
    '01.4549' AS RevCenter, 
    dbo.LabVols_MA00.SumOfUnitsMA AS Units, 
    dbo.LabVols_MA00.SumOfChargeMA AS Charges, 
    dbo.LabVols_MA00.Date, 
    dbo.Bridge_CDM_Activity_MA01.[Incl?], 
    dbo.Bridge_CDM_Activity_MA01.Divisor, 
    dbo.Bridge_CDM_Activity_MA01.[Static?],   
    CASE Divisor
        WHEN 0 THEN 0
        ELSE SumOfUnitsMA/Divisor
    END AS Volume
FROM dbo.LabVols_MA00 LEFT OUTER JOIN
    dbo.LabVols_HFees ON 
    dbo.LabVols_MA00.Code = dbo.LabVols_HFees.simmcode LEFT
     OUTER JOIN
    dbo.Bridge_CDM_Activity_MA01 ON 
    dbo.LabVols_MA00.Code = dbo.Bridge_CDM_Activity_MA01.simmcode
WHERE (dbo.LabVols_HFees.simmcode IS NULL) AND 
    (dbo.Bridge_CDM_Activity_MA01.simmcode IS NOT NULL) AND 
    (dbo.Bridge_CDM_Activity_MA01.[Incl?] = - 1)
regards
David Cameron
CEJ
Reply With Quote