SQL statement inquiry **brain-blocked here** :o(

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hello -

I'm totally brain-blocked here. I have a simple table that I'm trying
to execute a simple query from, yet I keep getting repeats and blanks.

My table is basically a column of UPC's, one of STORE's, and a third
for DEPARTMENT.
UPC STORE DEPT
012345 A 14
012345 C 32
987655 A 14
987655 B 17
875543 A 12
875543 B 9
875543 C 12
999988 B 9


What I would like to do is run a query and for "Store A" and have the
output list the UPC and DEPT for that particular store.

Thanks for any help! Happy New Year!
Dan
 
Can you post the SQL of the query that is not working for you? (HINT,
Select View: SQL from the menu)


I would expect to see something like the following - which should give
you the list you want

SELECT DISTINCT Store, Dept, UPC
FROM [YourTable]
WHERE Store = 'A'



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Can you post the SQL of the query that is not working for you?  (HINT,
Select View: SQL from the menu)

I would expect to see something like the following - which should give
you the list you want

SELECT DISTINCT Store, Dept, UPC
FROM [YourTable]
WHERE Store = 'A'

'====================================================
  John Spencer
  Access MVP 2002-2005, 2007
  Center for Health Program Development and Management
  University of Maryland Baltimore County
'====================================================


I'm totally brain-blocked here.  I have a simple table that I'm trying
to execute a simple query from, yet I keep getting repeats and blanks.
My table is basically a column of UPC's, one of STORE's, and a third
for DEPARTMENT.
UPC        STORE   DEPT
012345     A       14
012345     C       32
987655     A       14
987655     B       17
875543     A       12
875543     B       9
875543     C       12
999988     B       9
What I would like to do is run a query and for "Store A" and have the
output list the UPC and DEPT for that particular store.
Thanks for any help!  Happy New Year!
Dan- Hide quoted text -

- Show quoted text -

Thanks, I was forgetting the DISTINCT command.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top