[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Hard-coded values and instr() command



Regarding a prior post on this thread... I'm at the client-site again
and just to prove I'm not crazy I reran the original test...

CODE:

  #define mgr_codes ''MA'',''MB'',''QQ''
  let $mgr       = 'QQ'
  let $mgr_codes = '{mgr_codes}'
  display $mgr_codes
  if instr($mgr_codes, $mgr, 1)
     display 'Found'
  else
     display 'Missing'
  end-if

RESULTS:          (SQR V3.0.18.1.1)

     As Of Date: 21-JAN-1999
  Starting Time: 11:50:59
  TDTEST SQR Test

  'MA','MB','QQ'                       <=== Contents of $mgr_codes
  Found                                <=== Results of INSTR
    Ending Time: 11:50:59

SQRW: End of Run.

This is the actual SQR.LOG which proves this works. This doesn't work
under Version 4.0 and needs some adjustments pointed out in my last
post. I liked the performance of this version better. The mgr_codes
substitution variable could also be used for IN list functions => i.e.
and a.mgrcode IN ({mgr_codes}).

That's it... Obviously I'm a little bored at the moment! I think it's
time for a Western Omelette (w/Egg Beaters), american cheese, and dry
wheat toast! And of course coffee! I like eating breakfast for lunch!

                                          -Tony DeLia

--
Tony DeLia
AnswerThink Consulting Group
PeopleSoft Solutions Practice - Delphi Partners
tdelia@erols.com