ODP: ODP: [firebird-support] substring similar - "Invalid SIMILARTOpattern"

2018-12-05 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
Thank you once again. Now it is much clear that sql standard have more functions and much useful. I will wait for future improvements in Firebird. I stay longer with udfs for now. Regards, Karol Bieniaszewski

Re: ODP: [firebird-support] substring similar - "Invalid SIMILAR TOpattern"

2018-12-05 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 5-12-2018 18:00, Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support] wrote: > Is this sql standard concept that i must do this in this crap way? Yes, it is specified in SQL:2016, section 6.32 ", "". > SELECT substring('ab11c' similar '[[:ALPHA:]]+#"[0-9]+#"[[:ALPHA:]]+' >

ODP: [firebird-support] substring similar - "Invalid SIMILAR TOpattern"

2018-12-05 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
Thank you very much Mark for detailed info but i have more questions. I am really curious. Is this sql standard concept that i must do this in this crap way? SELECT substring('ab11c' similar '[[:ALPHA:]]+#"[0-9]+#"[[:ALPHA:]]+' escape '#') FROM RDB$DATABASE Also strange that i must consume

Re: [firebird-support] substring similar - "Invalid SIMILAR TO pattern"

2018-12-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 3-12-2018 08:46, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > Firebird 3 > can someone tell me how to work with substring similar? > SELECT substring('abc' similar 'a' escape '#')  FROM RDB$DATABASE > raise an error "Invalid SIMILAR TO pattern" > SELECT

[firebird-support] substring similar - "Invalid SIMILAR TO pattern"

2018-12-03 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,   Firebird 3   can someone tell me how to work with substring similar?   SELECT substring('abc' similar 'a' escape '#')  FROM RDB$DATABASE raise an error "Invalid SIMILAR TO pattern"     SELECT substring('ab11c' similar '[0-9]+' escape '#')  FROM RDB$DATABASE raise an error "Invalid SIMILAR TO

Re: [firebird-support] Substring and negative numbers

2016-09-06 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
Absolutely ! It seems that the mandatory postcode field has all kinds of non-postcode stuff in it ! For anyone else with this issue the original error was: Invalid length parameter -2 to SUBSTRING. Negative integers are not allowed. Changing the query to SELECT DISTINCT

Re: [firebird-support] Substring and negative numbers

2016-09-05 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Hello Jeremy, Tuesday, September 6, 2016, 3:55:52 AM, you wrote: > This simple query: > SELECT left(c.addr_5, CHAR_LENGTH(c.addr_5)-3) as trimmed > FROM vecusts c > > Produces this error The list can't take attachments or embeds so you need to copy the error message in text. > > Pressing OK I

[firebird-support] Substring and negative numbers

2016-09-05 Thread 'Jeremy Poppleton' jeremy.popple...@csy.co.uk [firebird-support]
This simple query: SELECT left(c.addr_5, CHAR_LENGTH(c.addr_5)-3) as trimmed FROM vecusts c Produces this error Pressing OK I then get correct values in the trimmed column. Can anyone assist or tell me what I am doing wrong? Many thanks [Non-text

AW: AW: [firebird-support] substring

2014-07-21 Thread 'checkmail' check_m...@satron.de [firebird-support]
Hello wrote: Hello Mark, Here the code of the sub-Procedure: create or alter procedure P_U_CN_TO_INT ( CN_IN varchar(30)) returns ( INT_OUT integer, STATUS smallint) AS declare variable I_ISNUMERIC smallint; BEGIN select true_param from p_u_isnumeric(:cn_in) into :i_isnumeric;

Re: AW: [firebird-support] substring

2014-07-19 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 18-7-2014 21:03, 'checkmail' check_m...@satron.de [firebird-support] wrote: Hello Mark, Here the code of the sub-Procedure: create or alter procedure P_U_CN_TO_INT ( CN_IN varchar(30)) returns ( INT_OUT integer, STATUS smallint) AS declare variable I_ISNUMERIC

[firebird-support] substring

2014-07-18 Thread 'checkmail' check_m...@satron.de [firebird-support]
Hello, If I use the following code to extract a part of a string, it works fine: s_datum = substring(:dat from 13 for 4); s_datum = char(4) Now I would give the same a stored procedure, the first input parameter is XXX varchar(30), it returns me the integer-value and the status

Re: [firebird-support] substring

2014-07-18 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 18-7-2014 14:00, 'checkmail' check_m...@satron.de [firebird-support] wrote: If I use the following code to extract a part of a string, it works fine: s_datum = substring(:dat from 13 for 4); s_datum = char(4) Now I would give the same a stored procedure, the first input parameter is XXX

AW: [firebird-support] substring

2014-07-18 Thread 'checkmail' check_m...@satron.de [firebird-support]
@yahoogroups.com Betreff: Re: [firebird-support] substring On 18-7-2014 14:00, 'checkmail' check_m...@satron.de [firebird-support] wrote: If I use the following code to extract a part of a string, it works fine: s_datum = substring(:dat from 13 for 4); s_datum = char(4) Now I would give the same

Re: [firebird-support] substring

2014-07-18 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
Hello Mark, Here the code of the sub-Procedure: create or alter procedure P_U_CN_TO_INT ( CN_IN varchar(30)) returns ( INT_OUT integer, STATUS smallint) AS declare variable I_ISNUMERIC smallint; BEGIN select true_param from p_u_isnumeric(:cn_in) into :i_isnumeric; if(i_isnumeric

[firebird-support] Substring function not working?

2013-02-28 Thread alexandermezhov
Hello! I use FirebirdClient ADO.NET http://ado.net/ Data Provider (v 3.0.2) and try to execute query that look like this: select * from SomeTable where substring(SomeColumn from @p0 for 4) = 'SomeString' where @p0 - query parameter. As a result, I get an exception:

[firebird-support] substring

2012-05-07 Thread Mahesh Pratihari
Hi , Could you please help me how to get the reverse substring in Firebird like in SQL SELECT SUBSTRING('Mahesh/pra',9,1) Which will returns 'r' in SQL , but in firebird in is returning null values, Please help me Thanks, Mahesh Pratihari Sonata Software Limited Phone :