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

Re: Range Question



Hi Hugh,

Thanks for your speedy response!  The solution was changing this code from
        LET $DEPT = &J.DEPTID   to LET $DEPT = RTRIM(&J.DEPTID, ' ')
due to the 6 trailing spaces.

And to think that this report has been in production for 4 years!

All good things,

Chris

-----Original Message-----
From: Vishner@AOL.COM [mailto:Vishner@AOL.COM]
Sent: 2000 Jul 19 3:15 PM
To: SQR-USERS@list.iex.net
Subject: Re: Range Question


Hi Chris,

If $Deptid = '7530', the range will return true whether
$TORANGE = '7530' or '7531'

If $Deptid = '7530 ' (note the extra space), the range
will return true if $TORANGE =  '7531',
but will return false if $TORANGE =  '7530'

HTH,
Hugh


In a message dated Wed, 19 Jul 2000  2:24:38 PM Eastern Daylight Time,
"Calder, Chris" <CCalder@JUSTICE.GC.CA> writes:

<< Hi Folks!

Ok, here's the scoop. The users enter a From and To range using the
Department Id.
When entering a Range of 7530 - 7530, no data is returned. If I use a range
of 7530-7531,
data is returned for department 7530. I suspect it is the code below using
the RANGE function.
I'm assuming that if $DEPT = 7530 and $FRRANGE and TORANGE are also 7530,
the value will
be returned as one (1), therefore true. Can anyone confirm this?

Thanks in advance! ;-)


  EVALUATE &L.LNG_RQMT_PSN
                WHEN = '1'
                     ADD 1 TO #DEPTALL1
                     IF RANGE($DEPT,$FRRANGE,$TORANGE)
                        ADD 1 TO #SECTOR1
                     END-IF
                     IF LTRIM(RTRIM(&LOC.GEOLOC_CODE,' '),' ') = '350614'
                        ADD 1 TO #NCR1
                     END-IF
                     BREAK

Chris Calder
Programmer/Analyst
PeopleSoft - HRMS
Tel: (613) 946-4751
 >>