我有以下查询,它没有给出预期的结果:
SELECT "invoice"."ITEMNO",
"invoice"."Outgoing",
"storeage"."incoming"
FROM "MVXJDTAP"."MVXJDTA"."invoice"
INNER JOIN "MVXJDTAP"."MVXJDTA"."storeage "
ON "invoice"."ITEMNO" = "storeage"."itemno"
ORDER BY"storeage"."itemno"
Tables:
invoice
itemno Outgoing
ZOMV3-94 4
ZOMV3-94 7
storeage
itemno incoming
ZOMV3-94 3
ZOMV3-94 1
ZOMV3-94 60
ZOMV3-94 5
查询给出结果:
itemno outgoing incoming
ZOMV3-94 4 3
ZOMV3-94 4 1
ZOMV3-94 4 60
ZOMV3-94 4 5
ZOMV3-94 7 3
ZOMV3-94 7 1
ZOMV3-94 7 60
ZOMV3-94 7 5
但我想得到以下 TRUE 结果:
ZOMV3-94 4 NULL OR 0
ZOMV3-94 7 NULL OR 0
ZOMV3-94 NULL OR 0 3
ZOMV3-94 NULL OR 0 1
ZOMV3-94 NULL OR 0 60
ZOMV3-94 NULL OR 0 5
我怎样才能得到这个结果?