×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Trần Hải Quân
Added: Apr 16, 2013 3:06 AM
Views: 22
Tags: sql episerver
  1. SELECT  c.pkID ,
  2.         cp.CoreCreated
  3. INTO #tmp
  4. FROM    dbBTFGrid_Core.dbo.CorePage cp
  5.         INNER JOIN dbo.LinkGuidMap m ON cp.CoreGuid = m.oldGuid
  6.         INNER JOIN dbo.tblContent c ON m.newGuid = c.ContentGUID
  7.         INNER JOIN dbo.tblWorkContent wc ON wc.fkContentID = c.pkID
  8.         INNER JOIN dbo.tblContentLanguage lg ON c.pkID = lg.fkContentID
  9.  
  10.  
  11. UPDATE dbo.tblWorkContent
  12. SET Created=#tmp.CoreCreated
  13. FROM dbo.tblWorkContent wc INNER JOIN #tmp ON wc.fkContentID=#tmp.pkID
  14.  
  15. UPDATE dbo.tblContentLanguage
  16. SET Created=#tmp.CoreCreated
  17. FROM dbo.tblContentLanguage cl INNER JOIN #tmp ON cl.fkContentID=#tmp.pkID
  18.  
  19. DROP TABLE #tmp
  20.