db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1623) Add ANSI TRIM implementation
Date Tue, 27 Mar 2007 08:43:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484354

Bernt M. Johnsen commented on DERBY-1623:

The SQL 2003 standard defines the TRIM function like this:

<trim function> ::= TRIM <left paren> <trim operands> <right paren>
<trim operands> ::= [ [ <trim specification> ] [ <trim character> ] FROM
] <trim source>
<trim source> ::= <character value expression>
<trim specification> ::= LEADING | TRAILING | BOTH
<trim character> ::= <character value expression>

Note that the LTRIM/RTRIM functions are defined in the JDBC spec as scalar string functions
that a JDBC driver should support as escaped function calls:   {fn LTRIM(....)} etc.

I think the most proper solution here is to implement the SQL TRIM function, and keep LTRIM/RTRIM
as is, as specified in the JDBC spec (for upward compatability, the escape syntax should not
be required).

> Add ANSI TRIM implementation
> ----------------------------
>                 Key: DERBY-1623
>                 URL: https://issues.apache.org/jira/browse/DERBY-1623
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Emmanuel Bernard
>         Assigned To: Manish Khettry
> JPA is requiring databases to support this ANSI feature esp the ability to chose the
trimmed character
> TRIM([ [ LEADING | TRAILING | BOTH ] [ chars ] FROM ] str)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message