RE: OT: SQL checking query

2002-07-11 Thread Al Everett
I want to write a query that will find all product IDs in the product table, that are not found in either the owner OR the sub_object columns in the menu table. (looking for orphan records, that are not found anywhere in the menu table). Any suggestions, here is what I have so far!

OT: SQL checking query

2002-07-10 Thread Paul Giesenhagen
Hello folks, I have an easy one I am sure... I am trying to build a query that will show all items that are not found.. Two tables: Product Table id, title Menu Table id, owner, sub_object I want to write a query that will find all product IDs in the product table, that are not found

Re: OT: SQL checking query

2002-07-10 Thread BEN MORRIS
Nested select statement. SELECT f.sub_object, p.title, p.sku FROM menu_table f, product_table p WHERE p.id = f.sub_object OR p.id = f.owner AND f.type = 'product' AND f.sub_object NOT IN (SELECT x.ID from theTable WHERE ...) Definately have

RE: SQL checking query

2002-07-10 Thread Bartee Lamar
product_table) Bartee Lamar www.enterpriseenergy.com MSN [EMAIL PROTECTED] -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 1:02 PM To: CF-Talk Subject: OT: SQL checking query Hello folks, I have an easy one I am sure... I am trying

Re: SQL checking query

2002-07-10 Thread Douglas Brown
Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 10:02 AM Subject: OT: SQL checking query Hello folks, I have an easy one I am sure... I am trying to build a query that will show all items that are not found.. Two tables

Re: SQL checking query

2002-07-10 Thread Charlie
Paul, do you need to accomplish this all in one query...if not cfquery name=qcf_pid datasource= SELECTid FROM Product Table /cfquery cfoutput query=qcf_pid cfquery name=qcf_check datasource= SELECTid FROMMenuTable WHERE

Re: SQL checking query

2002-07-10 Thread Paul Giesenhagen
:33 PM Subject: RE: SQL checking query SELECT f.sub_object, p.title, p.sku FROM menu_table f, product_table p WHERE p.id = f.sub_object OR p.id = f.owner AND f.type = 'product' AND f.sub_object NOT IN (select id from product_table