SELECT "OrdDet"."DetID",
"OrdDet"."ServQty",
"OItem"."PlanID",
CASE "OrdDet"."resourceID"
WHEN 100522 THEN 1024
WHEN 100488 THEN 50
END "ResourceAmount"
FROM "OrdDet"
JOIN "Subscription" USING ("subscrip
JOIN "PlanRate" USING ("PlanID")
AND "Subscription"."PlanID" = "Plan
WHERE "OrdDet"."resourceID" IN (10048
AND "Subscription"."PlanID" <= 265
AND "Subscription"."PlanID" >= 260
AND "PlanRate"."resourceID" = 10001
AND "OItem"."Status" = 40
AND "OIType" IN (60, 80)
AND "SubscrParam"."IncludedValue" != "PlanRate"."includedValue"
+ ("OrdDet"."ServQty" * "OrdDet"."resourceID")
ORDER BY "OrdDet"."subscriptionID"
「」「)CASE語句的WHERE
我需要能夠有‘OrdDet’。」 RESOURCEID」 1024或50上做這行的代碼
我的計算時AND "SubscrParam"."IncludedValue" != "PlanRate"."includedValue"
+ ("OrdDet"."ServQty" * "OrdDet"."resourceID")
在它只是利用此刻100522或100488.另外,當我使用「ResourceAmount」而不是「OrdDet」。「RESOURCEID」不承認「ResourceAmount」反正有我可以包括從我的計算中的情況改變了1024或50的值在哪裏?
什麼樣的關係數據庫是在此之後? '''的使用看起來很尷尬 – DrCopyPaste
這是一個關係數據庫,只需要引號。 –
行,但從哪個供應商和版本?:)請修復您的代碼,它有幾條未完成的行... – Pred