Re: SQL Question
Posted in 1998
>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@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