You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could say it's as designed <g>, because Claudio did
it that way, but the SQL spec thinks differently, i.e.
<value expression>s are allowed as SUBSTRING
arguments.
Included in the TODO list for the next version.
The text was updated successfully, but these errors were encountered:
Submitted by: @pcisar
SFID: 808010#
Submitted By: pcisar
the following code
SET TERM ;; ;
CREATE PROCEDURE t(s VARCHAR(10), i INTEGER)
AS
BEGIN
s = SUBSTRING(s FROM 2);
i = 2;
s = SUBSTRING(s FROM i);
END;;
produces
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 5, char 24
-i
SUBSTRING(s FROM 2+2) and (SUBSTRING s FROM
1 FOR i) do not work also
that is, engine refuses to accept anything but integer
constants as position and length parameters.
The workaround is to use substrlen UDF, but this IMO
defeats the whole point of introducing SUBSTRING as a
core function.
This affects both firebird 1.0 and 1.5 (tested on Windows
SS).
----------------------
User: dimitr
Logged In: YES
user_id=61270
I could say it's as designed <g>, because Claudio did
it that way, but the SQL spec thinks differently, i.e.
<value expression>s are allowed as SUBSTRING
arguments.
Included in the TODO list for the next version.
The text was updated successfully, but these errors were encountered: