ADSM-L

Re: [ADSM-L] select...where...like '$1%' is *invalid* w/ TSM v5.5.1 [workaround]

2008-07-13 10:51:48
Subject: Re: [ADSM-L] select...where...like '$1%' is *invalid* w/ TSM v5.5.1 [workaround]
From: James R Owen <Jim.Owen AT YALE DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sun, 13 Jul 2008 10:50:34 -0400
After too much (st,gr,f)umbling, here are v5.5.1 syntactical workarounds:

        select...where...like '$1%'     [valid syntax *until* v5.5.1]

can be replaced with:
        select...where...like '$1'||'%'
or      select...where...like concat('$1','%')

and
        select...where...like upper('%$1%')     [also *formerly* valid]

can be replaced with:
        select...where...like upper('%$1'||'%')
or      select...where...like upper('%'||'$1'||'%')
or      select...where...like upper(concat('%$1','%'))
but*not*select...where...like upper(concat('%','$1','%'))       [invalid]       
                                        [concat only works on 2 operands]
--
Jim.Owen AT Yale DOT Edu   (203.432.6693)

Richard Sims wrote:
Jim -

I don't have a 5.5 to test, but I would try the construct:

    ... LIKE CONCAT($1, '%')

and see if that is accepted.

    Richard Sims

On Jul 13, 2008, at 7:48 AM, James R Owen wrote:

After TSM v5.5.1 upgrade, the following command syntax is invalid:
    select...where...like '$1%'
This syntax was accepted in TSM scripts through TSM v5.5.0.3,
but our local scripts are broken after the upgrade.

Maybe I'm just too tired; is there a more appropriate technique to
concatenate $1 and % to enable these scripted comparisons?
--
Jim.Owen AT Yale DOT Edu   (203.432.6693)

<Prev in Thread] Current Thread [Next in Thread>