I wish to remove a leading substring from a string. I tried to use LTRIM function, but it returned a bad result. In detail
SELECT LTRIM(' AND DAT_MOD = ...', ' AND ') FROM DUAL;
returned
T_MOD = ...
instead of the expected
DAT_MOD = ...
I suppose that I should to convert the ' AND ' string to be trimmed as an object, rather than a set of characters. How can I get it?
LTRIMremoves each character in the string you provide as argument. So in your case, it removes every A, N, D and all spaces until the first character appears which is none of them.