user2145290
user2145290

Reputation: 41

displaying to records using Access 2010 sql

i've created a table called cust. has the columns, customer_number address and balance. customer numbers range from 100-105. what i am trying to do is get the balance of customer numbers 102 and 104.this is what i have tried and shows no results. customer 102 has a balance of 300, and 104 has a balance of 1900. here is what i tried:

select customer_number, balance
from Cust
Where customer_number = '102' and customer_number = '104';

but when i look at the output, i do not see those two records showing up. i know its something to do with my where clause, but i cannot seem to figure out what.

Upvotes: 0

Views: 50

Answers (1)

mkataja
mkataja

Reputation: 990

Change the and to or. Using and would mean you're looking for a record that has both the customer_number 102 AND the customer_number 104, which doesn't really make sense...

Upvotes: 1

Related Questions