We don't want customers who live too far away, either. We don't want customers who live in our town, Raleigh, so we want a criteria that will return all records except for those with Raleigh in the city field. How and where can we set criteria that will best help us answer our question? Review the list of fields we are including in this query. When you set criteria for a field in a query, you are basically applying a filter to it that tells the query to retrieve only information that matches your criteria. Step 4: Determining the criteria our query should search for So we just want to find people who don't live in our city but who still live in our area. We don't actually want our list to include customers who live too far away sending a coupon to someone who doesn't live in our area probably won't make that person come in. We want to get our out-of-town customers who've placed orders in the past to come back and give us another try, so we're going to mail them some coupons. Most of them live within the city limits, but others live out of town or even out of state. Our bakery database contains many customers, some of whom have never placed an order but who are in our database because they signed up for our mailing list. Step 1: Pinpointing the question we want to ask As you read through the planning process step by step, think about how each part of the planning process could apply to other queries you might run. Let's go through this planning process with a query we'll run on our bakery database. This process might seem abstract at first, but as we go through the process of planning our own multi-table query you should start to understand how planning your queries can make building them much easier. Which fields do you need to search for specific information? What information are you looking for? How will you search for it? Think about the question you asked in the first step. Determine the criteria the information in each field needs to meet.Locate the fields you want to include in your query.Identify every type of information you want included in your query results.If you could ask your database any question, what would it be? Building a query is more complicated than just asking a question, but knowing precisely what question you want to answer is essential to building a useful query. Pinpoint exactly what you want to know.When planning a query that uses more than one table, follow these four steps: A one-table query can be simple enough to make up as you go along, but to build anything more powerful you'll need to plan the query in advance. ![]() Queries can be difficult to understand and build if you don't have a good idea of what you're trying to find and how to find it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |