Page 1 of 1

Join problem!

Posted: Mon Jul 09, 2007 5:26 pm
by abc123
I have 2 links joining 10 rows each. I know that they are identical on the key column so that is definitely NOT the reason. The key column is char but has numbers like 1234. The number of rows I get after the inner join is less than 10. Could the positioning of the numbers in the column be a reason? How about partitioning on the join stage?

Posted: Mon Jul 09, 2007 5:54 pm
by ray.wurlod
Post the ten rows of keys. Also post the partitioning you are using.

Right now the answer to your question is a definite "maybe".

Posted: Mon Jul 09, 2007 10:10 pm
by abc123
I found the problem. It is due to join on a char field. The actual numeric data inside is smaller than the field width in all cases and this is causing the problem. Is there any way to get around this? Should I pad blanks on the left?

Posted: Mon Jul 09, 2007 10:51 pm
by hamzaqk
why do u want to pad it ? why dont u use the TRIM function or cast one of them into INT .. i think that should work ok..

Posted: Mon Jul 09, 2007 11:37 pm
by abc123
I take that back. I haven't found the solution. After I converted everything to integer in a transformer stage, the join still returns less value. I'll post some data.