SELECT A.A1
,A.A2
,B.B1
,B.B2
FROM
(SELECT X.A1
,Y.A2
FROM TABLE1 X
,TABLE2 Y
WHERE X.A3=Y.A4)
AS A
LEFT OUTER JOIN
TABLE3 B
ON B.B2=A.A2
Here A1, A2 and B2 are NULLable columns and B1 in NOT NULL
Resultant Data Set
A1 A2 B1 B2
1 2 1 2
2 10 5 10
3 12 -- --
7 11 -- --
However due to left outer join...For non matching rows from left side table i.e. TABLE1 and TABLE2, its making values of B1 and B2 as NULL (Though B1 is defined as NOT NULL)
While fetching its giving me -305 for column B1
I tried applying NULL indicator to column B1...Gave me Sql Code -303...Incomparable data items.
Please help
suhaas02