Is this Oracle? There is no such thing as "dual" in sql server...and just as a reminder this is a forum for sql server only.That being said; your query doesn't make any sense because you can't run an update and a select on the same CTE. It is however possible to update the underlaying table of a CTE:DECLARE @table table (ID int, Name varchar(100))INSERT INTO @table VALUES (1, 'Lumbago'), (2, 'hraj'), (3, 'webfred');with cte as ( select * from @table where ID < 3 )update cte set Name = Name + '_updated'select * from @table
- LumbagoMy blog-> www.thefirstsql.com