Subject | AW: AW: [firebird-support] string difficulty |
---|---|
Author | checkmail |
Post date | 2015-12-07T12:55:59Z |
.. and if the ID has the length of 15 chars and only the las * is for filling out to 16, i get a wrong result too.
Can I compact my code?
if(char_length(str)>16) then
begin
str = left(:str,16);
while (k = 1) do
begin
if(right(str, 1) = '*') then
begin
str = left(str,char_length(str)-1);
end
else
begin
teil = str;
k = 0;
end
end
end
(exept the one begin-end (only one command can be without..)
Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Gesendet: Montag, 7. Dezember 2015 11:32
An: firebird-support@yahoogroups.com
Betreff: Re: AW: [firebird-support] string difficulty
select replace('ABC*DEFG********01','**','') from RDB$DATABASE
On Monday, December 7, 2015 12:26 PM, "Virna Constantin costel_61@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:
sorry, wrong response :(
On Monday, December 7, 2015 12:22 PM, "Virna Constantin costel_61@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:
a quick answer :
m_char='**'
On Monday, December 7, 2015 12:12 PM, "'checkmail' check_mail@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:
But If the ID is ABC*DEFG, I get ABC*DEFG********01 and in this case only all * from right should be deleted.
I have create this, is there a simpler way?