home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / 5849 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  2.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!decwrl!deccrl!news.crl.dec.com!pa.dec.com!nntpd2.cxo.dec.com!tincup.enet.dec.com!lindsey
  2. From: lindsey@tincup.enet.dec.com (Randy Lindsey)
  3. Newsgroups: comp.databases
  4. Subject: Re: FoxPro questions, 2 easy, 1 harder.. : )
  5. Message-ID: <1992Jul30.221347.3739@nntpd2.cxo.dec.com>
  6. Date: 30 Jul 92 23:07:18 GMT
  7. References: <1992Jul25.154312.1@acad3.alaska.edu>
  8. Sender: usenet@nntpd2.cxo.dec.com (USENET News System)
  9. Organization: Colorado Software Solutions, Inc.
  10. Lines: 40
  11.  
  12.  
  13. In article <1992Jul25.154312.1@acad3.alaska.edu>, fscll@acad3.alaska.edu (Christopher Lee Lott -- One foot in the grave and the other slipping) writes...
  14. >1) Is there anyway to check for duplicate records using asingle field as the
  15. >key that is as easy as marking the field a key when you create it (I am told
  16. >you can do this in paradox)? I am trying to avoid having to scan the whole
  17. >database as I enter each record...
  18.  
  19. I'm not sure what's wrong with the solution you suggest.  Just make the 
  20. single field a key, NODUPLICATES, then either let Foxpro tell you it's an
  21. error when you attempt to add the record, or program it to seek on that
  22. key first yourself.  You can add new keys (TAGs in a structural compact
  23. index file are best) any time.
  24.  
  25. >2) Is there any way to avoid blank lines when doing mailing labels and having
  26. >an empty field sometimes?
  27.  
  28. I think the Foxpro label generator does this automatically.  Anyone else
  29. know if I'm wrong?
  30.  
  31. >3) Is there a way to transfer a data set from Quattro (as SDF is fine) into
  32. >FoxPro, and then have go through the database and add up the occurrences of
  33. >the same name? I have a large database of orders with the structure:
  34. >Order Number    Name               etc..
  35. >124234234       Doe, John
  36. >1334534         Doe, Jane
  37. >12354345        Doe, John
  38. >and I want to count up how many orders each person has... I figured some way
  39. >of sorting the database, finding the first occurrence, counting, finding next,
  40. >etc. I want to be able to do this without having to manually key in each name,
  41. >so when new customers come in they automatically get added... 
  42. >(this one may not be so easy, but any and all help is appreciated)
  43.  
  44. If you have an index on name, with duplicates allowed, you can just do
  45. a scan (either with or without the SCAN statement), counting up the occurances
  46. and writing the count to wherever.  You might also be able to do it with
  47. nested SELECT's (SQL), but I'm not an SQL wizard yet.
  48.  
  49. Randy
  50.