0 - 2 of 2 tags for full outer join derived tables where and clauses

I am doing a FULL OUTER JOIN on 2 tables. Answerset I am getting is truncating leading '0's for one of the columns. Is there a special consideration/casting that we have to do when we do a FULL OUTER JOIN? The results are coming out fine when i am doing INNER JOIN(no 0 truncation)

 

I've been having difficulty with the position of the WHERE/AND clauses within a FULL OUTER JOIN and filtering of the the data on either side of the full outer join. It seems if i'm doing a self join filtering by column for each sub-set the only bullet proof way to do it is to create derived tables of the data first, because all other data does not return the right results. Can somebody lead me to an explanation of how teradata creates the plans?

CREATE VOLATILE TABLE a (
aa INTEGER
,ab CHAR(2)
)PRIMARY INDEX(aa)
ON COMMIT PRESERVE ROWS;

CREATE VOLATILE TABLE b (