I need to join 2 tables which don’t have common column.
e.g
Table 1 â€" A
Table 2 â€" B
Table 1-Column AA
Table 2- Column BB
Column AA- 10 Char
Column BB- 2 Char
Basically AA column will hold some code e.g 1234567890
BB column will hold some code (Which is the same code of table A but it will be in parts)e.g 12, 34,56,78,90
For each this code have different description e.g 12 = XYZ (Table B),34 = ABC,56=DEF etc….
Why I need to join these two table because there is no relation for the Table B with any table in the database.
The only way I can do is I need to join it with the Table A.
Please help me out by giving your valuable suggestions!! I am very much in need
If you have any question please let me know. You can reach me on cognoshelp@ymail.com
Hi
I'm sure you probably know this but basically if you want to join 2 tables there needs to be a common column. If there isn't a common column in the database you could derive one, sounds like you could do something to the column in table B to make it common to the column in table A (substring it or play with the text so it gets rid of the ',' etc). If you can't do this in the database you could have a couple of sub queries, create a common calculation and then join the queries together.
Replace function on the ',' and then join on the resulting string that matches AA column..
Tip: post in the appropriate forum instead of in all forums ;D