I need query (to be more specific, it is view, not query) that will return string column. String will be code, that might be prefixed with two letters (LJ). If it is prefixed -- prefix have to be trimmed. If there is no prefix present, it should be left untouched. Is it possible to do such thing in SQL? Server is FirebirdSQL 1.5.
None of given solutions worked, but with their help, I was able to figure it out by myself. Substring
function does exist, but has different syntax. Instead of commas you have to use proper keywords:
Substring(col from pos for count)