Select GID, one, two, rtrim (ltrim (replace (substring (rightpart, charindex (';', rightpart) + 1, charindex (';', rightpart, charindex ('; ', rightpart),'; ', '') Three, main, column_id, column_name, parent_id, parent_name, fathers_id, father_name from (select
Replace (ltrim (rtrim (substring (cast ([main product or service] As varchar (1200), 1, charindex (';', cast ([main products or services] As varchar (1200), ';', ') One
, Left (right (cast ([main products or services] As varchar (1200), Len (cast ([main products or services] As varchar (1200 ))) -charindex (';', cast ([main product or service] As varchar (1200), DBO. checknum (charindex (';', right (cast ([main product or service] As varchar (1200 )), len (cast ([main product or service] As varchar (1200)-charindex (';', cast ([main products or services] As varchar (1200)-1) Two
, Len (cast ([main products or services] As varchar (1200)-charindex (';', cast ([main products or services] As varchar (1200 ))) three
, Right (cast ([main products or services] As varchar (1200), Len (cast ([main products or services] As varchar (1200)-charindex ('; ', cast ([main products or services] As varchar (1200) rightpart
, Len (cast ([main products or services] As varchar (1200) clength
, [Main products or services] Main, GID
From companys) tab, v_sort BBB where tab. One like '%' + BBB. column_name + '%' and one <> 'others'
The SQL statement is super powerful. It can be written without errors.
Undertake part-time Data Import
Number left