473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Incorrect results using FULL OUTER JOIN in DB2 v8

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
0 1776

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

Similar topics

6
by: paulus4605 | last post by:
Dears I have the following problem I’m using a query to get all the data from my database from the past year the second query is displaying the results by month. How can I match the second...
9
by: Chris Greening | last post by:
I'm seeing a very strange problem with outer joins. The example below replicates the problem: create table data1 (dim1 integer, stat1 float); create table data2 (dim1 integer, stat2 float); ...
0
by: reneecccwest | last post by:
SELECT d.code, d.description, v.code AS divCode, v.descripton AS divDescript, b.code AS brhCode, b.description AS brhDescript FROM Department d FULL OUTER JOIN Division v
4
by: John | last post by:
When I create a view consisting of an inner join between a view and a table the columns refernced in the the view are returned incorrectly, example select id.itemcode, id.description,...
7
by: alexcn | last post by:
I have the following query: SELECT dbo.tSymExch.exCode, dbo.tSymGrp.sgCode, dbo.tSymMain.smCode FROM dbo.tSymExch FULL OUTER JOIN dbo.tSymGrp ON dbo.tSymExch.exID =...
1
by: tekanet | last post by:
Hello folks, first of all I really don't know how you gurus call this way of writing joins: SELECT A.FIELD, B.FIELD FROM TABLE_A A, TABLE_B B
1
by: Greg Stark | last post by:
I think this is just a bad case of "nested loops are costed wrong". But it's a really really bad case. Like, even without any overlap in records looked up in the nested loop I cannot imagine it...
2
by: Pasquale | last post by:
I am using the query below for a multi event registration confirmation page. Any one of these events can have individuals and/or teams, which also then can have different categories of individuals...
1
by: Vivienne | last post by:
Hi there This is a hard problem that I have - I have only been using sql for a couple of weeks and have gone past my ability level quickly! The real tables are complex but I will post a simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.