[thelist] Quick SQL help

James Conley Conleyj at kubota-kma.com
Wed Mar 1 09:00:11 CST 2006

What is the schema of the table(s)?
If you table looks has columns for Order,SKU,Warehouse,and Location
And an example row looks like [1234,ABC,2,A] ['A' being the Location
And you want to select all rows that have "A" in the location then
SELECT DISTINCT Order from table_name where Location='A'


SELECT Order FROM table_name WHERE location='A' GROUP BY Order

James c 

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Rob Smith
Sent: Wednesday, March 01, 2006 9:54 AM
To: thelist at lists.evolt.org
Subject: [thelist] Quick SQL help


Take a sample order (Order, SKU, Warehouse, Location):
1234 ____ ABC ____ A ____ 2
1234 ____ ADE ____ C ____ 40
1235 ____ EEF ____ C ____ 55
1236 ____ EEJ ____ A ____ 1
1236 ____ JJK ____ A ____ 1

How do I narrow this list down to show all orders that had at least one
"A" location in it?


Rob Smith
rob.smith at lexjet.com
(941)330-1210 Int'l
(941)330-1220 Fax
1680 Fruitville Road, 3rd Floor
Sarasota, FL 34236

Proud Sponsors of the Professional Digital Imaging Association


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester and
archives of thelist go to: http://lists.evolt.org Workers of the Web,
evolt ! 

More information about the thelist mailing list