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

[sqr-users] fetch value in array



Hi,
 I'm working on sqr interface where in I read data
from flat file and before loading into table have to
validate data(i.e, emplid exists in Peoplesoft). The
sorted(by emplid) flat file has duplicate emplid with
unique grantnumbers. When I identify emplid who don't
exist in Psoft, they should be printed on report with
emplid and count of duplicate emplid(count of grants).
           If $id = $oldid
              let #cnt = #cnt + 1
              !show 'Emplid: ' $id '  count: ' #cnt
            Else
              show 'Emplid: ' $oldid  ' count:' #cnt  

              let #cnt = 1
            End-if 
  
            let $oldid = $id
This is the logic I'm using to get count for
duplicates. But initially for the first emplid there
is no $oldid(previous value), it shows in else
condition and skips the last row.

Emplid    Grant
xyz        112
xyz        231
xyz        145
yxz        133
yxz        245
zyx        115

In short the report format should be like
Emplid    Count
xyz        3 
yxz        2
zyx        1 

Thanks
Prashanth
          


                
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users