473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Orphan Records (Joined tables)

Given this setup:

inventory.itemID

item.itemID
item.description
I want a list of item descriptions which do NOT have an inventory
record. Any ideas? I did this before in MS Access as I recall by making
a query of things with inventory only then excluding those but I can't
even recall how to do that now. I'm working with php/mysql now and had
some luck generating aql with Access but not for this one.
Jul 31 '05 #1
1 1565
paul wrote:
Given this setup:

inventory.itemID

item.itemID
item.description
I want a list of item descriptions which do NOT have an inventory
record. Any ideas? I did this before in MS Access as I recall by making
a query of things with inventory only then excluding those but I can't
even recall how to do that now. I'm working with php/mysql now and had
some luck generating aql with Access but not for this one.

I got it (pretty simple in access and works on mysql):

SELECT plants.plantID, description.latin_name
FROM description LEFT JOIN plants ON description.id = plants.description_id
WHERE (((plants.plantID) Is Null));
Jul 31 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Thorne | last post by:
Have 2 tables ts_sheets : TimeSheet_ID TimeSheet_Date Emp_ID Orphan LineItem TimeSheet_ID Client
1
by: anmar | last post by:
I'm trying to figure out how to select all the records in one table which have multiple specified records in a second table. Here's a simplified version of my problem. I have two tables,...
3
by: Steve | last post by:
I have a people table of about 25 fields. The table is initially created each year from 5 different sources. The records from each source are appended to the people table. Any person may be in one...
0
by: DeanL | last post by:
Hi guys, I'm having a problem getting newly added records to cascade through to other tables in the query I use for a form. If I add a record to the form then the additions are fine as long as...
1
by: julian_m | last post by:
I'm working with mysql without referential itegrity. Let me make some small example: tableA +-----------+---------------+ | id_1 | data_1 | +-----------+---------------+ | 1 ...
2
by: julian_m | last post by:
I'm working with mysql without referential itegrity. Let me make some small example: tableA +-----------+---------------+ | id_1 | data_1 | +-----------+---------------+ | 1 ...
2
by: Jim Devenish | last post by:
I have two tables: Deliveries and Invoices. An Invoice can relate to a number of Deliveries. The relevant fields are: Invoices: InvoiceID InvoiceDate Deliveries: DeliveryID
4
by: Neil | last post by:
I previously posted about data shifting between records in my Access 2000 MDB with a SQL Server 7 back end, using ODBC linked tables. Every once in a while, data from one record mysteriously...
2
by: sharsy | last post by:
Hello, I have a Database setup that has two tables that are linked. Table1 contains a list of people with their basic contact details (name & phone number etc.) and Table2 contains a list of all...
2
by: smilem | last post by:
Hi, I use Gallery2 v2.3 system on my web server. When I add and delete photos I see orphan records in my db. The project is opensource and developers are focused on new v3 of the product. However...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.