By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,278 Members | 1,544 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,278 IT Pros & Developers. It's quick & easy.

Incorrect results using FULL OUTER JOIN in DB2 v8

P: 2
In the example that follows, I am receiving an incorrect result set in the View. I am looking to get the FULL result set from View_LY and Table_TY. Instead, this View is returning the Common (Equi) records and records on Table_TY only. Missing the records on View_LY only. Any known problems with FULL OUTER JOIN in DB2 or am I missing something. Documentation all around is somewhat limited:

View: View_LY
Store (PK)
Product (PK)
Week (PK)
LY_Week
Sales_Units_LY

Table: Table_TY
Store (PK)
Product (PK)
Week (PK)
Sales Units TY

CREATE VIEW View_TY_LY AS
SELECT TY.Store,
TY.Product,
TY.Week,
LY.LY_Week,
LY.Sales_Units as Sales_Units_LY,
TY.Sales_Units as Sales_Units_TY
FROM Table_LY LY FULL OUTER JOIN View_TY TY on TY.Store = LY.Store and TY.Product = LY.Product and TY.Week = LY.Week
Aug 13 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.