I have 2 tables, one with names, and another with addresses, joined by their
CIVICID number (unique to the ADDRESSINFO table) in Oracle.
I need to update a field in the NAMEINFO table for a particular surname in a
particular town.
I can select the records fine with this syntax (testing in Oracle SQL* Plus)
SELECT NAMEINFO.LASTNA ME, NAMEINFO.FIRSTN AME, NAMEINFO.MIDDLE NAME,
NAMEINFO.GENDER , ADDRESSINFO.REG ION FROM NAMEINFO, ADDRESSINFO WHERE
ADDRESSINFO.CIV ICID =NAMEINFO.CIVIC ID (+) AND 'Smith'=NAMEINF O.LASTNAME AND
'Moncton'=ADDRE SSINFO.TOWN;
However, I tried to update the names and failed. Here is my syntax:
UPDATE NAMEINFO SET NAMEINFO.FLAG= 'OK' WHERE ADDRESSINFO.CIV ICID
=NAMEINFO.CIVIC ID (+) AND (('Smith'=NAMEI NFO.LASTNAME) AND
('Moncton'=ADDR ESSINFO.TOWN));
Is there anyway to update the FLAG field with using a Where clause using
bits of 2 tables?
I can do it in Access, using the GUI, but the syntax is different between
the 2 databases...
Help!
CIVICID number (unique to the ADDRESSINFO table) in Oracle.
I need to update a field in the NAMEINFO table for a particular surname in a
particular town.
I can select the records fine with this syntax (testing in Oracle SQL* Plus)
SELECT NAMEINFO.LASTNA ME, NAMEINFO.FIRSTN AME, NAMEINFO.MIDDLE NAME,
NAMEINFO.GENDER , ADDRESSINFO.REG ION FROM NAMEINFO, ADDRESSINFO WHERE
ADDRESSINFO.CIV ICID =NAMEINFO.CIVIC ID (+) AND 'Smith'=NAMEINF O.LASTNAME AND
'Moncton'=ADDRE SSINFO.TOWN;
However, I tried to update the names and failed. Here is my syntax:
UPDATE NAMEINFO SET NAMEINFO.FLAG= 'OK' WHERE ADDRESSINFO.CIV ICID
=NAMEINFO.CIVIC ID (+) AND (('Smith'=NAMEI NFO.LASTNAME) AND
('Moncton'=ADDR ESSINFO.TOWN));
Is there anyway to update the FLAG field with using a Where clause using
bits of 2 tables?
I can do it in Access, using the GUI, but the syntax is different between
the 2 databases...
Help!
Comment