Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Jerry Schwartz (jschwartzthe-infoshop.com)
Date: Wed May 21 2008 - 10:45:08 CDT
I have a list of codes. Some, but not all, of these codes will match the
entries in a product table. Here's what the data would look like:
List of Codes:
The rows in the product table look like
What I want to is get a list of ALL of the codes, with the associated
prod_num if it exists or a flag if it does not:
I need to preserve the "empty" rows in order to match the data against an
Excel worksheet (which is where the list of codes came from).
I have done this by putting all of the codes into a temporary table and
doing a LEFT JOIN against the product table. Works fine, lasts a long time.
However, it seems that I ought to be able to do this without the temporary
table, by using derived tables. I just can't figure out how.
This is mostly a curiosity question.
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql