Tom,

Do not use a table alias (t1) for the table you are updating, use the full
name
update CommonCode +
  set CCData = t2.CCData, +
    CCModified = t2.CCModified +
 from CommonCode, tmpCode t2 +
 where CommonCode.CCName = t2.CCName +
   and CommonCode.CCModified < t2.CCModified

Bill


On Fri, Aug 31, 2012 at 11:44 AM, TOM HART <[email protected]> wrote:

> I get an I/O error when I try to run:
>
> update CommonCode set CCData = t2.CCData,CCModified = t2.CCModified+
>  from CommonCode t1, tmpCode t2 where t1.CCName = t2.CCName+
>  and t1.CCModified lt t2.CCModified
>
> I am trying to update a code table if the modification date changes
> CCData is the code=varchar
> CCModified is DateTime stamp which I want use to update code
>

Reply via email to