I have a path like this in my TBL_Documents
table:
Uploads/Documents/6093/12/695-Graco-SW_5-15-19.pdf
I need to compare it to a file being uploaded now that will look like this:
695-Graco-SW_5-15-19.pdf
I want to compare the path in my table with the uploaded file name. I tried using substring()
on the first right /
but I don't really get how substring is really working. For example, I tried to do this:
select substring(right(path,1),1,1) as path from TBL_DOCUMENT
but it is only giving me the very first character from the right. I expected to see everything after the last /
character.
How can I do this?