SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table tg ( reportpath1 varchar(255), reportpath2 varchar(255)); insert into tg (reportpath1) values ('/gaga/baba/zaza'), ('/rereasdf/qwew/baas'); SELECT *, LEFT(reportpath1, CHARINDEX('/', reportpath1, 2)), SUBSTRING(reportpath1, CHARINDEX('/', reportpath1, 2), LEN(reportpath1)) FROM tg;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear