>Here is my unsimplified actual code using your suggestions; T1 is replaced with year1 and I also have to separate out the states and customers that correspond.
>
>
>SELECT NVL(Year1.fcustno,Year2.fcustno) AS custno,;
> NVL(Year1.fcstate,"") AS state1, NVL(Year2.fcstate,"") AS state2,;
> NVL(Year1.q1sum,0.00) AS y1q1sum, NVL(Year2.q1sum,0.00) AS y2q1sum;
> FROM ;
> Year1 ;
> FULL JOIN Year2 ;
> ON Year1.fcustno = Year2.fcustno;
> AND Year1.fcstate = Year2.fcstate
>
>
>
>This has the following problems.
>If we did not do business with a customer in year1 it is not showing up in the result even though we did do business in year2
If the JOIN conditions are correct, then all rows will show up correctly.
If it's not broken, fix it until it is.
My Blog