I have following table
ID | Name | Url
Each Url contains address to file fe: “http://blah.blah.com/abcde.bin”. Address is always same but file name. In need SQL query to update all cells in this column, where Url contains http and store only file name.
Example:
SELECT URL FROM TABLE
1 | "http://blah.blah.com/abcde.bin"
UPDATE ...
SELECT URL FROM TABLE
1 | "abcde.bin"
Try this query:
it doesn’t use
containorsubstring, but does the same, with less code. If it finds the'http://blah.blah.com/'string, it will be replaced with an empty string, so you will have just your name.I didn’t try it but I think it’s correct.
Hope it helps you.