RE: [firebird-support] string difficulty

2015-12-08 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
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.

AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

Re: [firebird-support] string difficulty

2015-12-07 Thread Virna Constantin costel...@yahoo.com [firebird-support]
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);   

AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

[firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

Re: [firebird-support] string difficulty

2015-12-07 Thread Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
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

AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
-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

Re: AW: [firebird-support] string difficulty

2015-12-07 Thread Virna Constantin costel...@yahoo.com [firebird-support]
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

Re: AW: [firebird-support] string difficulty

2015-12-07 Thread Virna Constantin costel...@yahoo.com [firebird-support]
sorry, wrong response :( On Monday, December 7, 2015 12:22 PM, "Virna Constantin costel...@yahoo.com [firebird-support]" wrote: #yiv0072394990 #yiv0072394990 -- #yiv0072394990

Re: AW: [firebird-support] string difficulty

2015-12-07 Thread Virna Constantin costel...@yahoo.com [firebird-support]
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

AW: AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

AW: AW: [firebird-support] string difficulty

2015-12-07 Thread 'checkmail' check_m...@satron.de [firebird-support]
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.

Re: [firebird-support] string difficulty

2015-12-07 Thread setysvar setys...@gmail.com [firebird-support]
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 =

RE: [firebird-support] string difficulty

2015-12-07 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
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