Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have 2 tables below. I need to join 'Office Number' in 'A' with 'Office' in 'B' table. ODBC connected to ACCESS database.
A:
SQL SELECT
`New Code`,
`New Sub Code`,
`Office Name`,
`Office Number`,
FROM `office codes`;
B:
SQL SELECT
Office,
Product,
Week,
Year
FROM Total;
Your suggestions will be highly appreciated.
Thanks
join (A)
SQL SELECT
Office as [Office Number],
Product,
Week,
Year
FROM Total;
Regards
Anders
join (A)
SQL SELECT
Office as [Office Number],
Product,
Week,
Year
FROM Total;
Regards
Anders
Hello,
Anders's answer is correct. I'd use anyway the LOAD statement always, and leave the SQL statement as plain as possible:
A:LOAD `New Code`,`New Sub Code`,`Office Name`,`Office Number`;SQL SELECT`New Code`,`New Sub Code`,`Office Name`,`Office Number`,FROM `office codes`; B:LOADOffice AS [Office Number],Product,Week,Year;SQL SELECTOffice,Product,Week,YearFROM Total;
Hope this helps
Andres - When i use "JOIN" in my script , all the fields in Table B joined with all the Fields in Table A . But what I need is... link the same data fields which are having different names. So, i thought i just need to rename the Field name by following your example. That solution working fine for me!!
Miguel - Thanks for your detailed solution. That's working fine !!!
Thanks a lot for both of you.