FW: simple count

Bruce Easton bruce at stn.com
Thu Jun 12 12:51:57 PDT 2008


scooter6 at gmail.com  wrote Thursday, June 12, 2008 3:27 PM:
-------------------------------------------------
I have filePro 5.0.9 on SCO Unix.

I have about 300,000 records in a file.  Each of these records has a
'Status' field. (let's call this fileA)
There is also a way to 'view' a lookup when browsing fileA to another file
to see a date of incident.  (let's call this fileB)

What I'm trying to do is get a count for all records that are in status "10"
and whose date in fileB is less than or equal to 3 yrs ago from today.......

I don't want a printout of all these records, just a count.

After being up most of the night dealing with some other work issues, my
brain is a little mush right now.

Can someone point me in the right direction on quickest way to do this?

thanks

Scott Ullmann
-------------------------------------------------------

Scott - try this (fPseudo-coded) running *report out of fileA:

  If:  yd eq ""
Then:  yd(10,mdyy/,g)=@td-"1095"  'poor man's 3 yrs ago date
  If:
Then:  lookup fileB  k=(joinkey)  i=[joinindex] -nx
  If:  not fileB
Then:  end
  If:  fileB(incidentdatefld#) le yd and statusfld# eq "10"
Then:  tl(6,.0,g)=tl+"1"
  If:
Then:  end
@wgt0  If:  '**or something else if it actually has to print out
     Then:  errorbox "My total count is:"<tl

** like assign a dummy field there and put in grand total
area on a format where the data area is blank (since
you don't want any detail by each record).

Bruce

Bruce Easton
STN, Inc.








-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00125.txt
Url: http://mailman.celestial.com/pipermail/filepro-list/attachments/20080612/67e7e345/attachment.txt 


More information about the Filepro-list mailing list