Posted on 2005-05-02
Im trying to get a result to return only the paths out of my hard drive, through a database, I have imported all files on my hard drive into the database.
When I query through Access I use:-
SELECT Left([path],InStrRev([path],"\")) AS Expr1
GROUP BY Left([path],InStrRev([path],"\"));
and get 40 rows back, whatever I try in MySql I only get half the rows back. I know my probelm is cause MySql doesnt support 'InStrRev', but cant see any similar functions.
I have tried to make my own instrrev like this "length(`path`) - INSTR(reverse(`path`),"\\"))) "
InstrRev is the same as instr, but returns the last value in the string, instead of where it found it first.