Complex queries for confused individual!

C

CQMMAN

Hello,

I have four tables in a database.


TABLE1
TableName: dbo_add_or_remove_program_info
MachineID
InstanceKey
DisplayName
ProdID
PublisherID
VersionID

TABLE2
TableName: tblProdDesc
ID
PartNum
AddRemDesc

TABLE3
TableName: tblProducts
PartNum
PartDesc

TABLE4
Tablename: tblInvoices
ID
transdate
InvoiceNum
PartNum
Quantity


Table one and two are joined with a link between Displayname and AddRemDesc.
Table two and three are joined with a link between PartNum in each table.
Table three and table four are joined with Partnum in each table as well.

What I would like to do, is have a query that displays

*PartDesc * Installed * Quantity * Deviation *

PartDesc is from table3, installed is a count of number of times a product
is listed in table1, quantity is from table4.

So it is all very, very confusing to a beginner. Someone kindly told me how
to create a table that gives me part of the info (a calculated field to
count the number installed on workstation by using a Count field from the
add_remove table), but I am really stuck on the rest.

The difficulty is that I might have multiple records in add_remove_programs
for different products (ie, Microsoft Project 2000 SR-1, and Microsoft
Project 2000), and that is why I need to link them together and match it
with the product that the license was purchased for (the reason for a few
tables!!).

Any help or comments would be greatly welcome!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top