Help with queries please

T

Tim

I have set up a simple address table with a column for entries such as
p for postcard, c for christmas and w for wedding, how can I use
query to access each address if I only want the wedding addresses or
the christmas addresses etc, Some have a c, a w and a p in that column
but when I run a query just for p it doesn't pick that address up.

Is there any way round it or do I have to set up three columns one for
postcard, wedding and christmas.

Any ideas anyone?
 
R

Richard Wilde

You can use a wildcard * and the like operator to return what you want

SELECT table.column
FROM table
WHERE table.type Like '*P*'
 
R

Richard Wilde

oops query is slightly wrong

SELECT table.column
FROM table
WHERE table.column Like '*P*'

Sorry for confusion.
 
J

Jeff Boyce

Tim

What are you planning to do when you need to add birthdays, Bar Mitzvahs,
and "first date" notations?

What will you do if you want to pick folks/address who have both birthdays
and Christmas?

Consider revisiting the topic of "normalization" in Access HELP -- it sounds
like you have a "one-to-many" relationship. In a relational database like
Access, you're better off handling this with a "parent" and "child" table
design.

Good luck

Jeff Boyce
<Access MVP>
 

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

Top