db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Eder (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5602) Add support for a SQL REPEAT(string, count) function
Date Sat, 04 Feb 2012 09:25:53 GMT
Add support for a SQL REPEAT(string, count) function

                 Key: DERBY-5602
                 URL: https://issues.apache.org/jira/browse/DERBY-5602
             Project: Derby
          Issue Type: Improvement
          Components: SQL
    Affects Versions:
            Reporter: Lukas Eder
            Priority: Minor

A similar function was discussed with Rick Hillegas in this ticket:

Apparently, JDBC mentions a REPLACE function in its appendix:

> Compare the JDBC escape function (from Appendix D2 of the 4.1 JDBC spec):
> "REPLACE(string1, string2, string3) Replaces all occurrences of string2 in string1 with

It also mentions a REPEAT function

"REPEAT(string, count) A character string formed by repeating string count times"

This REPEAT function would be a nice-to-have enhancement to simulate padding directly in the
database, where this may be needed. Most databases ship with some form of REPEAT:

- RPAD(string, LENGTH(string) * count) in Oracle, Ingres
- REPLICATE(string, count) in Sybase ASE, SQL Server
- REPEAT(string, count) in DB2, H2, HSQLDB, MySQL, Postgres, Sybase SQL Anywhere

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message