techker Posted May 20, 2020 Share Posted May 20, 2020 hey guys i have a table streams that has multiple columns but i need one and brake the string? stream_source contains ["http:\/\/server:8080\/9Lx0YfoxZp\/DexfrUxcn\/2107"] so i need just : http:\/\/server:8080 as dns 9Lx0YfoxZp as username and DexfrUxcn as password i have tried a few was like this example.. but no luck im guessing its because i first need to remove [" ? SELECT SUBSTRING_INDEX(stream_source, ' \/ ', 1) AS dns, SUBSTRING_INDEX(SUBSTRING_INDEX(stream_source,' \/ ', 2), ' ',-1) AS mname, SUBSTRING_INDEX(stream_source, ' \/ ', -1) as lname FROM streams; Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.