Re:Why doesn't this query work?
Posted in 1999
Hi ! You cannot give two table names in the UPDATE command as you have given, so you will have to give another sub-query to select the value for the field. So then your query will look like this :- update tab1 set tab1.field1 = (select field1 from tab2 where field1="abc") where field2 = "xyz" Hope that will help... Nayan Jain's little drop in Informix Ocean ! Good Luck, Nayan ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Only that man can take a right decision, whose soul is not tormented by the afflictions of attachment and aversion." -- Mahavira On 20 May 1999, Sebastian Paul Avarvarei wrote: > Simon Leigh (20.05.1999 17:19): > >Help! I want to run this simple update query, but it doesn't work, it says > >it's got a syntax error. > >Any ideas? > > > >UPDATE ISMTMPRPTSTAGE1 E, ISMTMPRPTSTAGE2 F SET E.COUNTTAKENUP = F.TAKENUP > >WHERE (E.COMMCODE = F.COMMCODE) AND (E.CAMPCODE = F.CAMPCODE) > > > >Thanks > > > >Simon > > Hi! >