'Cross-product' and join question



Hi,
I'm designing a query with DBArtisan against a Sybase database. I'm not
a SQL guru but I can usually get the results I need given a good
understanding of the database and the relationships between tables.
However, this problem has me stumped. When I run the following query:

SELECT DISTINCT dbo.T_MULTILIST_GRADE.grade,
dbo.T_MULTILIST.code,
dbo.T_MULTILIST.description,
dbo.T_RECEIVING_DETAIL.amount,
dbo.T_ORDER.requisition_time_stamp,
dbo.T_REQUISITION.id,
dbo.T_DEPOSITORY.depository_type,
dbo.T_REQUISITION_DETAIL.quantity,
dbo.T_RECEIVING_DETAIL.invoice_number,
dbo.T_RECEIVING.status
FROM dbo.T_MULTILIST, dbo.T_MULTILIST_GRADE, dbo.T_REQUISITION,
dbo.T_REQUISITION_DETAIL, dbo.T_ORDER, dbo.T_DEPOSITORY,
dbo.T_RECEIVING_DETAIL, dbo.T_RECEIVING
WHERE (dbo.T_RECEIVING_DETAIL.invoice_number =
dbo.T_RECEIVING.invoice_number AND
dbo.T_RECEIVING_DETAIL.order_id = dbo.T_ORDER.id AND
dbo.T_ORDER.depository_id = dbo.T_DEPOSITORY.id AND
dbo.T_REQUISITION.id = dbo.T_ORDER.requisition_id AND
dbo.T_REQUISITION_DETAIL.requisition_id = dbo.T_REQUISITION.id AND
dbo.T_REQUISITION_DETAIL.multilist_code =
dbo.T_MULTILIST_GRADE.multilist_code AND
dbo.T_MULTILIST_GRADE.multilist_code = dbo.T_MULTILIST.code)

I receive the following 'Warning' from DBArtisan:
'Warning: Table T_RECEIVING_DETAIL is not involved in the join and will
result in the generation of a cross product'

I also get duplicate records, the result of the cross-product. I don't
understand why T_RECEIVING_DETAIL is 'not involved in the join',
however. The data model in this database leaves a lot to be desired.
Any advice would be greatly appreciated.

Thanks,
Bill

.



Relevant Pages

  • Re: Access 2000 Make Table Query Warning Box -- use currentdb.execute
    ... currentdb.execute "SQL or action queryname" ... When this query is run, and before it asks the user for the input, I get a warning message that says that the query is about to replace the table with new data, and is the user ok with that?, yes or no. ... As the database designer, I know to answer yes, and it goes through the function with no issues. ...
    (microsoft.public.access.queries)
  • Re: Cant Update Records
    ... >I've now put both tables in the same database ... You're apparently assuming either that you are the only person asking ... >when I try to edit...I get a warning that someone else has edited the record ... If you'ld care to post the SQL of the query, ...
    (microsoft.public.access.forms)
  • Re: Warn me Not
    ... Use Dirto test if the target file exists. ... Kill it before executing your query. ... I am taking a table in one database and, using a make table query, ... Deletions did not seem to eliminate the warning. ...
    (microsoft.public.access.queries)
  • Re: SQL statement in Perl doesnt work
    ... The last answer by Brian McCauley made me look again at the query result from the database. ... By changing the range of records I got the results I expected in the first place, so I apparently misinterpreted the warning. ...
    (comp.lang.perl.misc)
  • Re: Append query
    ... Yes Both Append queries run just fine if I just run them from main screen or ... I'll take out the warning. ... >> I am trying to run an Append query from VBA code. ... >> this in the same database to run a delete Query using this code and it ...
    (microsoft.public.access.formscoding)