View previous topic :: View next topic
|
Author |
Message |
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
Hi,
I have 2 tables which needs to be joined based on Client and Product.
However one product is AA in Table A and BB in Table B. All other products are same on both tables. Is it possible to Join A and B for AA and BB. they are both same. Please let me know.
Code: |
Table A
Client Prod
----------------
123 AA
123 XX
345 TT
567 ZZ
Table B
Client Prod Data
---------------------
123 BB Product Data1
123 XX Product Data 2
345 TT Product Data 3
Expected output
Client Prod Data
-------------------------------
123 AA/BB Product Data1
123 XX Product Data 2
345 TT Product Data 3
|
Please suggest if this is feasible through a left join or some way. I tried the REPLACE command in a left join but it was not working |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How many other mis-matched pairs might eventually need to be supported? Why is there this mis-match?
How much would it take to make this value consistent in both files?
What you want to do would be trivial in a program and would be easier to expand if the requirement "grows". |
|
Back to top |
|
|
CJT
New User
Joined: 02 Aug 2007 Posts: 83 Location: Here
|
|
|
|
HI Dick,
looks like there was a miscommunication among team located at different locations and evantually 2 various entries came into place. I guess this is the only entry that will remain so. |
|
Back to top |
|
|
|