New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build in function LPAD result is wrong if argument is longer then length to padd parameter [CORE2745] #3140
Comments
Modified by: @livius2Version: 2.1.3 [ 10302 ] summary: LPAD work wrong if argument is longer then length parameter => LPAD work wrong if argument is longer then length to padd parameter |
Modified by: @livius2description: select LPAD('123', 4, '0') FROM RDB$DATABAS select LPAD('1234', 4, '0') FROM RDB$DATABAS select LPAD('12345', 4, '0') FROM RDB$DATABASE result in this situation should be '12345' lpad should not change string if length is longer then length parameter => select LPAD('123', 4, '0') FROM RDB$DATABASE select LPAD('1234', 4, '0') FROM RDB$DATABASE select LPAD('12345', 4, '0') FROM RDB$DATABASE result in this situation should be '12345' lpad should not change string if length is longer then length parameter |
Modified by: @livius2summary: LPAD work wrong if argument is longer then length to padd parameter => Build in function LPAD work wrong if argument is longer then length to padd parameter |
Commented by: Lester Caine (lsces) http://www.firebirdsql.org/refdocs/langrefupd20-udf-lpad.html |
Modified by: @livius2summary: Build in function LPAD work wrong if argument is longer then length to padd parameter => Build in function LPAD result is wrong if argument is longer then length to padd parameter |
Commented by: @livius2 if this is as designed Function: Format: Notes: Example: add in this description position: //############################################ and then i add new issue/new feature request to add some function like lpad and rpad without this limitation |
Submitted by: @livius2
select LPAD('123', 4, '0') FROM RDB$DATABASE
result '0123' ok
select LPAD('1234', 4, '0') FROM RDB$DATABASE
result '1234' ok
select LPAD('12345', 4, '0') FROM RDB$DATABASE
result is 1234 - this is wrong
result in this situation should be '12345'
lpad should not change string if length is longer then length parameter
The text was updated successfully, but these errors were encountered: