×

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: May 14, 2013 7:00 AM
Modified: Jun 13, 2013 2:59 AM
Views: 33
Tags: sql episerver
  1. SELECT  R01.pkId ,
  2.         R01.String07 AS MailSubject ,
  3.         SUBSTRING(R01.String07, CHARINDEX('"', R01.String07) + 1, LEN(R01.String07) - 10 - CHARINDEX('"', R01.String07)) AS NewFormName
  4. INTO #tmp
  5. FROM    dbo.tblSystemBigTable AS R01
  6.        -- INNER JOIN dbo.tblBigTableIdentity AS [Identity] ON R01.pkId = [Identity].pkId
  7. WHERE   ( R01.StoreName = 'XForms' ) AND ( R01.Row = 1 )
  8.  
  9.  
  10.  
  11. UPDATE t
  12. SET t.String05=#tmp.NewFormName
  13. FROM #tmp INNER JOIN dbo.tblSystemBigTable t ON #tmp.pkId = t.pkId
  14.  
  15. DROP TABLE #tmp