Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
hii have this code that select the text i want i want to add this to a coulmn in my table
select case when charindex('Class',[Group]) > 0 then substring([Group], charindex('Class',[Group])+0,len([Group])-charindex('Class',[Group])+1)endfrom dbo.BNYWorkingTempNavTable
whats the best way to do it
tkizer
Almighty SQL Goddess
38200 Posts
Posted - 2014-05-16 : 12:02:16
update SomeTableset SomeColumn = case when charindex('Class',[Group]) > 0 then substring([Group], charindex('Class',[Group])+0,len([Group])-charindex('Class',[Group])+1)endTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/