[Solved] TRIM multiple characters from a string
Posted: Sat Jan 19, 2019 8:44 am
Hi All,
Looking for a method to trim multiple characters from in a string, when communicating with certain Clients.
The record shows e.g. 'Document A-Renew.'.
There is an other record that shows 'Document A'
Both have the same Qualification.
There are also other documents that end on ' BiG or '-small', which can have their own Qualification.
When our Client is communicating with their Clients in relationship to the same Qualification, they want to inform them that their 'Document A' needs to be renewed.
Because both the mentioned Documents have the same Qualification, our Client only want to communicate about 'Document A'.
I am trying therefore to TRIM the record 'Document A-Renew' to just "Document A' and e.g. other documents from Ŕecord-small' to 'Record'.
I can get the trailing characters, like '-Renew', but I have no idea how to get just the left part of the string, which varies in length.
Any suggestions?
Kind regards,
Dream
Looking for a method to trim multiple characters from in a string, when communicating with certain Clients.
The record shows e.g. 'Document A-Renew.'.
There is an other record that shows 'Document A'
Both have the same Qualification.
There are also other documents that end on ' BiG or '-small', which can have their own Qualification.
When our Client is communicating with their Clients in relationship to the same Qualification, they want to inform them that their 'Document A' needs to be renewed.
Because both the mentioned Documents have the same Qualification, our Client only want to communicate about 'Document A'.
I am trying therefore to TRIM the record 'Document A-Renew' to just "Document A' and e.g. other documents from Ŕecord-small' to 'Record'.
would be a principle, but that only trims one character.TRIM ([ [ LEADING | TRAILING | BOTH ] [ <trim character> ] FROM ] <char value expr> )
I can get the trailing characters, like '-Renew', but I have no idea how to get just the left part of the string, which varies in length.
Any suggestions?
Kind regards,
Dream