RE: [firebird-support] string difficulty
How about working backwards through the string?
Andrew Zenz
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Sent: Tuesday, 8 December 2015 6:59 AM
To: firebird-support@yahoogroups.
d-support@yahoogroups.com
<mailto:firebird-support@yahoogroups.com>
Subject: Re: [firebird-support] string difficulty
Den 07.12.2015 13:55, skrev 'checkmail' <mailto:check_m...@satron.de>
check_m...@satron.de
[firebird-support]:
> .. and if the ID has the length of 1
Thank you Set :)
Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Gesendet: Montag, 7. Dezember 2015 20:59
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] string difficulty
Den 07.12.2015 13:55, skrev 'checkmail' <mailto:chec
How can I get ABC*DEFG, leave the * between C*D, delete all * from right?
SET TERM ^ ;CREATE PROCEDURE DEL_CHAR ( M_SIR varchar(500), M_CHAR
varchar(10) )RETURNS ( M_STR varchar(500) )AS declare ii smallint;
declare iy smallint;BEGIN m_str=''; iy=char_length(m_sir);
begin
teil = str;
k = 0;
end
end
end
Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Gesendet: Montag, 7. Dezember 2015 09:56
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] string difficulty
Hello @ll,
I have an input string ABCDEFG, filled with * to 16 chars, ABCDEFG*,
followed with zwo digits, f. e. 01
ABCDEFG*01
01 can I cut for an other function, now I have ABCDEFG*
The filled * I can delete for my real ID (ABCDEFG)
left(:str, position('*' in
Hi, using your code, how about left(:str, position('**' in :str)-1));
select left(:str, position('**' in :str)-1)) from yourtable
However, to make things easier for future users, think about changing
the single '*' to e.g. '-' and then you can keep your existing select
statements and not have
-support@yahoogroups.com]
Gesendet: Montag, 7. Dezember 2015 10:09
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] string difficulty
Hi, using your code, how about left(:str, position('**' in :str)-1));
select left(:str, position('**' in :str)-1)) from yourtable However, to make
a quick answer :
m_char='**'
On Monday, December 7, 2015 12:12 PM, "'checkmail' check_m...@satron.de
[firebird-support]" wrote:
But If the ID is ABC*DEFG, I get ABC*DEFG01 and in this case only all *
from right should be deleted.
I have
sorry, wrong response :(
On Monday, December 7, 2015 12:22 PM, "Virna Constantin costel...@yahoo.com
[firebird-support]" wrote:
#yiv0072394990 #yiv0072394990 -- #yiv0072394990
select replace('ABC*DEFG01','**','') from RDB$DATABASE
On Monday, December 7, 2015 12:26 PM, "Virna Constantin costel...@yahoo.com
[firebird-support]" wrote:
#yiv7701085015 #yiv7701085015 -- #yiv7701085015
ABC Then will be the three *** deletet,
only the right * should be cut, this are the * who filled…
Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Gesendet: Montag, 7. Dezember 2015 11:22
An: firebird-support@yahoogroups.com
Betreff: Re: AW: [firebird-support] str
det: Montag, 7. Dezember 2015 11:32
An: firebird-support@yahoogroups.com
Betreff: Re: AW: [firebird-support] string difficulty
select replace('ABC*DEFG01','**','') from RDB$DATABASE
On Monday, December 7, 2015 12:26 PM, "Virna Constantin
<mailto:costel...@yahoo.
Den 07.12.2015 13:55, skrev 'checkmail' check_m...@satron.de
[firebird-support]:
> .. 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 =
How about working backwards through the string?
Andrew Zenz
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Sent: Tuesday, 8 December 2015 6:59 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] string
15 matches
Mail list logo