Re: SQL Question

From: sdagg <sdagg_at_dccsinc.com>
Date: 1998/02/27
Message-ID: <6d7sip$fml$1_at_tor-nn1.netcom.ca>#1/1


Hi there,

If you are preparing this statement try this have your statement read

update A set col1 = ? where col1 matches ?

when you define the variable to use for the second ? make it char(15) like

value1 char(15)

and add this logic just before the statement is executed

let value1 = value1 clipped, "*"

if value1 is already 15 characters long nothing will happen otherwise it will append the asterisk (*) immediately following the last character.

Shawn

KPonn wrote in message <19980228015300.UAA17752_at_ladder03.news.aol.com>...
>Hi,
>

>We have a table with a char column: col1 char(15). I need to do the
 following:
>update A set col1 = ? where col1 matches "something*". The problem is that
 the
>length of "something" is variable and can be anywhere from 2 to 15
 characters.
>It works fine if "something" is 14 or less characters with * padded at the
 end.
>But, if "col1 is 15 characters long and if I pad it with a *, I am getting
 an
>error. I really need to pad it with a * because the length of col1 may
 change
>in the future and I cannot recode this application.
>
>Thanks in advance.
>Keith
Received on Fri Feb 27 1998 - 00:00:00 CET

Original text of this message