The SQL statement is super powerful. It can be written without errors.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.