> I have a large CD collection with the following fields: artist, title,
> label, number, year, genre & comments. If, after I run individual queries
> i.e.. B.B. King, The Drifters, Elvis Presley could I then
> incorporate these queries into 1 table which I could then alphabetize by
> artist and print out the results?
> Basically what I want to do is extract artists
> (i.e. Elvis) that have more then 5 entries and then delete them from the
> original CD Table so I won't have to print this same material when I
> my CD table and make a new printout.
Hello and good morning,
If you dont mind me asking, how did you get all your cd collection info into
a paradox table ?
With paradox, you will find that there are many ways to accomplish what you
need to do.
That being said, I can tell you some of the steps to do what I think you
even though I might not do it that way myself.
How do you determine if an artist has more than 5 queries ?
Do you do a query and check the artist name and calc count unique on title ?
Even though you could do delete queries, I am not sure that is how I would
I might create an extra field on the main table, called useYN, an alpha
field with size 1,
and then create a series of queries to flag the ones I wanted.
Query 1 would change all records in master table so that useYN to "N "
Query 2 would do a query to create a summary table that shows how many
albums each artist has.
Query 3 would use summary table to link back to master table, an change
useYN to Y when number of albums was below a certain threshold, less than 5
in your example.
Query 4 would extract all master records with useYN that equal Y - and
create an answer table.
Then I would run my report, with the report being based on the answer table.
Deleting records doesnt necessarily scare me, but it usually is not my first
What if you delete records, and did not save them somewhere ?
Inputting the information again would be upsetting.
On certain types of paradox queries , paradox creates temporary auxillary
The delete query can do this.
But if you are not careful, and you dont have the settings correct, a delete
query may just remove the records from the original table, and not place the
records into an auxillary table.
To do what you asked,
first use pdox and table copy your master table to another name, so that you
have a full backup.
Make sure aux tables are being generated for queries.
Create a delete query and run it for artist you said.
This should create a deleted.db in your private subdirectory,
( exiting paradox at this point will delete this table automatically , be
use tools, utilities, rename to rename the ":priv:deleted.db" to
I am assuming you know about priv and work aliases.
Some will suggest to create a new alias, but that isnt always necessary for
some quick adhoc thing.
Now you have 2 tables, master table and artistsBig.
If you want to run another delete query, run it.
You will now have another deleted query.
This time - dont rename it, because you dont want to crush the existing
Use Tools,utilities, add - to add records from deleted to artistsBig.
Repeat delete query and add records for each artist you want to move from
master to artistsBig.db.
Paradox gives you the power to do many things, including shooting yourself
in the foot.
Please be careful with delete queries, and consider use of flagging and
Other suggestions to control limited printing of artists might be :
Create an artists.db that contains 2 fields, artist Name and printYN.
This could be a query from your master table, check the artist name, and in
another field , put calc "N" as printYN, and run the query.
This will get you an answer table.
Rename answer to luArtistsPrint.db.
Manually go through lookup table and flick N to Y as you want.
Then create a 2 table query that links the lookup table to the master table,
and extracts records from master table when the printYN = Y, run the query
and the records you want will be in the answer table.
Run your report , with report based on answer table.
Hope this helps more than confuses, it got kind of long.