select * into supplier_20141104 from Supplier; select top 10000 s.SupplierName,sg.Name, SUBSTRING(s.SupplierName,0,CHARINDEX('(',s.SupplierName)) from Supplier s with(nolock) join SupplierGroup sg on sg.Id=s.SupplierGroupId where s.IsSelfSupport=3 and CHARINDEX('(',s.SupplierName)>0 ; update Supplier set SupplierName=SUBSTRING(SupplierName,0,CHARINDEX('(',SupplierName)) where IsSelfSupport=3 and CHARINDEX('(',SupplierName)>0; |
|