CodePudding user response:
declare @ s nvarchar (Max)
The set @ s='hongta group yuxi cigarette factories'
Select substring (@ s, 1, charindex (' (' @ s) - 1) as [left]
, the substring (@ s, charindex (' (' @ s) + 1, charindex (') '@ s) - charindex (' (' @ s) - 1) as the
, the substring (@ s, charindex (') '@ s) + 1, len (@ s)) AS right
/*
Left in the right
Hongta group yuxi cigarette factories
*/
CodePudding user response:
How do you write regular?CodePudding user response:
Database don't require it to regular, you can go in the application side