butterhook
asked on
Problem cutting off trailing backslash from field value in mysql
Hi there
Trying to do something to manipulate a path e.g.
pathid pathlocation
1 c:\path\to\somewhere\
2 c:\path\to\somewhere\
How can I cut the trailing slash as it's an escaping character??
I'm trying this:
SELECT TRIM(TRAILING `n` FROM `bunion`);
and getting 'bunio'
But if I try this:
SELECT TRIM(TRAILING `\` FROM 'C:\path\to\somewhere\');
It doesn't even run
And nor does this:
SELECT TRIM(TRAILING `\\` FROM 'C:\\path\\to\\somewhere\\ ');
Any ideas???
Trying to do something to manipulate a path e.g.
pathid pathlocation
1 c:\path\to\somewhere\
2 c:\path\to\somewhere\
How can I cut the trailing slash as it's an escaping character??
I'm trying this:
SELECT TRIM(TRAILING `n` FROM `bunion`);
and getting 'bunio'
But if I try this:
SELECT TRIM(TRAILING `\` FROM 'C:\path\to\somewhere\');
It doesn't even run
And nor does this:
SELECT TRIM(TRAILING `\\` FROM 'C:\\path\\to\\somewhere\\
Any ideas???
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER