Intercepts a string by the specified character and intercepts 300
Business requirements: Want to match the frame line part of the picture
First step from last/intercept to end
Select top 1 reverse (substring (reverse (processcontrolname), 1,charindex ('/', reverse (processcontrolname))-1) from Processpublish;
--The second step is based on the first step from the last one. Intercept
Select RTRIM (LTRIM (Reverse (substring (reverse), processcontrolname ('/', 1,charindex (reverse))-1 )))) as Web-side templates, RTRIM (LTRIM (Reverse (substring (reverse), Mobileformtemplatepath ('/', 1,charindex ( Mobileformtemplatepath)))))) as a mobile-phone template, *
From Processpublish
where ProcessID >2489--The newly added "Hua Ji construction"
and processcontrolname! = "--the template is not equal to NULL, stating that BPM originated
and Mobileformtemplatepath! = "'
--The third step is to get rid of it on the basis of the second step. HTML fields
Select top 1 (SUBSTRING (substring (reverse (processcontrolname), charindex ('. ', reverse (processcontrolname)) +1,len ( Reverse (Processcontrolname))-charindex ('. ', reverse (processcontrolname))), 1,charindex ('/', (SUBSTRING (reverse ( Processcontrolname), CHARINDEX ('. ', reverse (processcontrolname)) +1,len (reverse (processcontrolname))-charindex ('. ') , reverse (Processcontrolname))))-1) from Processpublish
Finally, complete
Select (SUBSTRING (substring (reverse (processcontrolname), charindex ('. ', reverse (processcontrolname)) +1,len ( Reverse (Processcontrolname))-charindex ('. ', reverse (processcontrolname))), 1,charindex ('/', (SUBSTRING (reverse ( Processcontrolname), CHARINDEX ('. ', reverse (processcontrolname)) +1,len (reverse (processcontrolname))-charindex ('. ') , reverse (Processcontrolname))))-1) as web-side templates,
(SUBSTRING (substring (reverse (mobileformtemplatepath), charindex ('. ', reverse (Mobileformtemplatepath)) +1,len ( Reverse (Mobileformtemplatepath))-charindex ('. ', reverse (Mobileformtemplatepath))), 1,charindex ('/', (substring ( Reverse (Mobileformtemplatepath), charindex ('. ', reverse (Mobileformtemplatepath)) +1,len (Reverse ( Mobileformtemplatepath))-charindex ('. ', reverse (Mobileformtemplatepath)))))))) (1)) as mobile-side template, *
From Processpublish
where ProcessID >2489--The newly added "Hua Ji construction"
and processcontrolname! = "--the template is not equal to NULL, stating that BPM originated
and Mobileformtemplatepath! = "'
and (SUBSTRING (substring (reverse (processcontrolname), charindex ('. ', reverse (processcontrolname)) +1,len (Reverse ( Processcontrolname))-charindex ('. ', reverse (processcontrolname))), 1,charindex ('/', (SUBSTRING (reverse ( Processcontrolname), CHARINDEX ('. ', reverse (processcontrolname)) +1,len (reverse (processcontrolname))-charindex ('. ') , reverse (Processcontrolname)))) (1))! = (substring (substring (reverse), Mobileformtemplatepath ('. ', Reverse (Mobileformtemplatepath)) +1,len (reverse (Mobileformtemplatepath))-charindex ('. ', Reverse ( Mobileformtemplatepath))), 1,charindex ('/', (substring (reverse (mobileformtemplatepath), charindex ('. '), Reverse ( Mobileformtemplatepath) +1,len (reverse (Mobileformtemplatepath))-charindex ('. ', reverse (Mobileformtemplatepath)) )))-1))
Three inconsistencies were found.
Step-by-step -104-sql statement (Intercept string)