You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Reginald Johnson <re...@gmail.com> on 2008/03/31 03:03:42 UTC

Updating a Substring in a Field

Hello,
  Does Derby have a built in function that would allow me to do an SQL query
to update a substring, something like this:

UPDATE TABLE1 SET SUBSTRING(FieldName, original-substring, new-substring)
WHERE FIELD1 = 'moose'

Re: Updating a Substring in a Field

Posted by Narayanan <V....@Sun.COM>.
Hi,

Derby does not have a built in function that would enable you to do that,

but I think it should be simple enough to write one using the 
instructions and the
samples provided here

http://wiki.apache.org/db-derby/DerbySQLroutines

Narayanan

Reginald Johnson wrote:
> Hello,
>   Does Derby have a built in function that would allow me to do an SQL 
> query to update a substring, something like this:
>
> UPDATE TABLE1 SET SUBSTRING(FieldName, original-substring, 
> new-substring) WHERE FIELD1 = 'moose'
>
>