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...
>1) Is there anyway to check for duplicate records using asingle field as the
>key that is as easy as marking the field a key when you create it (I am told
>you can do this in paradox)? I am trying to avoid having to scan the whole
>database as I enter each record...
I'm not sure what's wrong with the solution you suggest. Just make the
single field a key, NODUPLICATES, then either let Foxpro tell you it's an
error when you attempt to add the record, or program it to seek on that
key first yourself. You can add new keys (TAGs in a structural compact
index file are best) any time.
>2) Is there any way to avoid blank lines when doing mailing labels and having
>an empty field sometimes?
I think the Foxpro label generator does this automatically. Anyone else
know if I'm wrong?
>3) Is there a way to transfer a data set from Quattro (as SDF is fine) into
>FoxPro, and then have go through the database and add up the occurrences of
>the same name? I have a large database of orders with the structure:
>
>Order Number Name etc..
>124234234 Doe, John
>1334534 Doe, Jane
>12354345 Doe, John
>
>and I want to count up how many orders each person has... I figured some way
>of sorting the database, finding the first occurrence, counting, finding next,
>etc. I want to be able to do this without having to manually key in each name,
>so when new customers come in they automatically get added...
>(this one may not be so easy, but any and all help is appreciated)
If you have an index on name, with duplicates allowed, you can just do
a scan (either with or without the SCAN statement), counting up the occurances
and writing the count to wherever. You might also be able to do it with
nested SELECT's (SQL), but I'm not an SQL wizard yet.