View Full Version : Cross platform relationship


Jim Stanicki
12-12-2007, 10:47 AM
Just as in real life, I have a problem with relationships.
I am trying to mate a MSSQL table with a Access table. The only commonality seems to be phone number. But of course the Access Table has it defined as ten bytes (area code, exchange, Line number) and the MSSQL table has a field for exchange (3bytes) and field for line number (4bytes). I know they all have the same area code to I can plug it. But how?? One more thing.. I am linking them both to a Access 2007 database as I can't modify either table.
So.. My best guess, or at least my current guess, is to use a User defined field to group the separate fields into a complete phone number. Can I do that in a query?
If someone could kick me in the right direction I would appreciate it.
Thanks
Jim

SQL_Hell
12-13-2007, 05:24 AM
Hi,

I think I understand what you mean...

So if the area code is 'D42' for example could you not do something like:

SELECT * FROM
ACCESS A
INNER JOIN MSSQL M
ON A.PHONE = 'D42' + M.EXCHANGE + M.LINENUMBER

Jim Stanicki
12-18-2007, 10:00 AM
Thanks for taking the time to help.