home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,626 of 2,288   
   Dave to All   
   SQL Update with a Join Syntax   
   06 Aug 04 19:43:38   
   
   From: nospam@nospam.com   
      
   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.LASTNAME, NAMEINFO.FIRSTNAME, NAMEINFO.MIDDLENAME,   
   NAMEINFO.GENDER, ADDRESSINFO.REGION FROM NAMEINFO, ADDRESSINFO WHERE   
   ADDRESSINFO.CIVICID =NAMEINFO.CIVICID (+) AND 'Smith'=NAMEINFO.LASTNAME AND   
   'Moncton'=ADDRESSINFO.TOWN;   
      
   However, I tried to update the names and failed.  Here is my syntax:   
   UPDATE NAMEINFO SET NAMEINFO.FLAG= 'OK' WHERE ADDRESSINFO.CIVICID   
   =NAMEINFO.CIVICID (+) AND (('Smith'=NAMEINFO.LASTNAME) AND   
   ('Moncton'=ADDRESSINFO.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!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca