S
Sunny
I am having problem with outer join in query. I am sure I am missing
something and I am sure someone will point me the right direction.
I have 2 tables
AreaOffice
Purchases
I want all the records from Areaoffice and related purchases from Purchases
table.
AreaOffice:
AOId AOName
1 AreaI
2 AreaII
3 AreaIII
Purchases:
AOId Date Amount
1 7/1/04 100
1 7/2/04 200
3 7/1/04 300
What I want is
AOId AOName Date Amount
1 AreaI 7/1/04 100
1 AreaI 7/2/04 200
2 AreaII
3 AreaIII 7/1/04 300
But I dont get AreaII record on final result. Here is my query:
SELECT AreaOffice.AoId, AreaOffice.AOName, Purchases.Date, Purchases.Amount
;
from Areaoffice LEFT OUTER JOIN purchases on purchases.aoid =
areaoffice.aoid ;
order by ao_id
Why am I not getting expected records?
Thanks.
something and I am sure someone will point me the right direction.
I have 2 tables
AreaOffice
Purchases
I want all the records from Areaoffice and related purchases from Purchases
table.
AreaOffice:
AOId AOName
1 AreaI
2 AreaII
3 AreaIII
Purchases:
AOId Date Amount
1 7/1/04 100
1 7/2/04 200
3 7/1/04 300
What I want is
AOId AOName Date Amount
1 AreaI 7/1/04 100
1 AreaI 7/2/04 200
2 AreaII
3 AreaIII 7/1/04 300
But I dont get AreaII record on final result. Here is my query:
SELECT AreaOffice.AoId, AreaOffice.AOName, Purchases.Date, Purchases.Amount
;
from Areaoffice LEFT OUTER JOIN purchases on purchases.aoid =
areaoffice.aoid ;
order by ao_id
Why am I not getting expected records?
Thanks.