J
Jeff via AccessMonster.com
I have the following query in Access that I'm trying to convert to a SQL
Script to be run on a SQL Server database. Here's the code in Access:
UPDATE individual LEFT JOIN location ON individual.OLDLOCID = OLDSYSID SET
individual.LOCID = location.SYSID
WHERE location.OLDSYSID Is Not Null
My problem is that the SQL in Access and SQL Server 2000 don't always
translate perfectly. Specifically, it seems you cannot use JOINS in an action
query. To get around this I'm thinking I have to do something like:
UPDATE individual
SET individual.LOCID = (SELECT SYSID FROM location WHERE OLDSYSID = ???)
But how do I get the SELECT statment to return just one record. Do I need a
temp. variable?
Script to be run on a SQL Server database. Here's the code in Access:
UPDATE individual LEFT JOIN location ON individual.OLDLOCID = OLDSYSID SET
individual.LOCID = location.SYSID
WHERE location.OLDSYSID Is Not Null
My problem is that the SQL in Access and SQL Server 2000 don't always
translate perfectly. Specifically, it seems you cannot use JOINS in an action
query. To get around this I'm thinking I have to do something like:
UPDATE individual
SET individual.LOCID = (SELECT SYSID FROM location WHERE OLDSYSID = ???)
But how do I get the SELECT statment to return just one record. Do I need a
temp. variable?