Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Updating a CTE Expand / Collapse
Author
Message
Posted Friday, June 27, 2008 6:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, June 5, 2009 10:42 AM
Points: 27, Visits: 9
Hello,

I have a CTE and wish to update it. Is this possible?

I want the UPDATE to work recursively for all the records in the CTE? is this possible.

Kindly help.

Regards,
meatssc
Post #524903
Posted Friday, March 4, 2011 9:27 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, January 11, 2013 6:50 AM
Points: 38, Visits: 292
In this case, use Temp table.

suppose you try to update CTE, It will update the source table value. it will lead data loss.
Post #1073421
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse