Re: SQL Question

From: KPonn <kponn_at_aol.com>
Date: 1998/02/28
Message-ID: <19980228151401.KAA05923_at_ladder02.news.aol.com>#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
>
>
>
>
>
>
>
>

Thanks for the reply. That's exactly what I was doing (using ESQL not 4GL). I am still getting an error.
Keith Received on Sat Feb 28 1998 - 00:00:00 CET

Original text of this message