.. 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 <mailto:costel...@yahoo.com> costel...@yahoo.com [firebird-support]" < <mailto:firebird-support@yahoogroups.com> firebird-support@yahoogroups.com> wrote: sorry, wrong response :( On Monday, December 7, 2015 12:22 PM, "Virna Constantin <mailto:costel...@yahoo.com> costel...@yahoo.com [firebird-support]" < <mailto:firebird-support@yahoogroups.com> firebird-support@yahoogroups.com> wrote: a quick answer : m_char='**' On Monday, December 7, 2015 12:12 PM, "'checkmail' <mailto:check_m...@satron.de> check_m...@satron.de [firebird-support]" < <mailto:firebird-support@yahoogroups.com> 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?