doh!, actually I tried that initially but receive a Syntax error, so I
removed them thinking they were not needed.  Im running SQL7 and testing the
code in ISQL.  I have the syntax exactly like shown below but receive an
err....

Not sure what to try next.........


-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]

The reason you are getting multiple records in the subquery is cos you've
removed the table aliases that Brian suggeted.  Put them in and you should
be ok if the rest of your data is in the same pattern as the sample dat ayou
posted.  i.e.

UPDATE mytable m
SET DATE1 = (SELECT DATE1
                 FROM   mytable t
                 WHERE  m.REFNO = t.REFNO
                 AND    DATE1 IS NOT NULL)
WHERE DATE1 IS NULL



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to