Browse Prior Art Database

Performance Enhancement of TRANSLATE Function

IP.com Disclosure Number: IPCOM000121661D
Original Publication Date: 1991-Sep-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 2 page(s) / 60K

Publishing Venue

IBM

Related People

Boykin, JR: AUTHOR [+3]

Abstract

Disclosed is a performance enhancement for the TRANSLATE function, when operands two and three are supplied as constants and operand four, if supplied, is a constant.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Performance Enhancement of TRANSLATE Function

      Disclosed is a performance enhancement for the TRANSLATE
function, when operands two and three are supplied as constants and
operand four, if supplied, is a constant.

      The TRANSLATE function is an SQL function that takes one,
three, or four arguments.  The first argument is a string to be
translated, character by character, into another string.  If there is
just one argument, all the lower case characters in that argument are
translated to upper case and all the other characters are unchanged.
If there are a second and a third argument, they are used to specify
the translations to take place.  Any occurrences in the first
argument string of the Nth character in the third argument are
translated into the Nth character of the second argument.  If the
second argument is shorter than the third argument, the second
argument is effectively padded with copies of a default character to
make them the same length. If the fourth argument is specified, it is
used as the default padding character.  Otherwise, a blank is the
default padding character.  If the second argument is longer than the
third argument, then the unneeded characters in the second argument
are ignored.

      The invention pertains to cases where three or more arguments
have been specified for an invocation of TRANSLATE and the second,
third, and (if specified) fourth arguments are constants.  In these
cases, we will at compile time build a...