?
Solved

MS Access query...interpreting the SQL

Posted on 2008-06-13
5
Medium Priority
?
180 Views
Last Modified: 2010-03-20
This is from a  Make Table Query in Access:

SELECT TblLPOLICY.POLNUM,
       TblLPOLICY.EFF_DATE,
       TblLPOLICY.EXP_DATE INTO TblClass056Policies
FROM TblLPOLICY
WHERE (((TblLPOLICY.COVERAGE)="056" Or
        (TblLPOLICY.COVERAGE)="057" Or
        (TblLPOLICY.COVERAGE)="135" Or
        (TblLPOLICY.COVERAGE)="136"))

If you omit the WHERE section, the query will put EVERY POLNUM from TblPOLICY
into TblClass056Policies...  Correct?
0
Comment
Question by:bergen69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21782159
yes, thats right.
0
 
LVL 75
ID: 21782162
correct.

mx
0
 
LVL 75
ID: 21782171
Another syntax:

SELECT TblLPOLICY.POLNUM,
       TblLPOLICY.EFF_DATE,
       TblLPOLICY.EXP_DATE INTO TblClass056Policies
FROM TblLPOLICY
WHERE TblLPOLICY.COVERAGE) IN ( "056" , "057" ,"135" , "136")
0
 
LVL 44

Expert Comment

by:GRayL
ID: 21782174
The query will put the three fields from every record in tblLPolicy into TblClass056Policies
0
 
LVL 1

Expert Comment

by:SugarMag76
ID: 21782177
If you remove the WHERE section, it will make a table containing the POLNUM, EFF_DATE, and EXP_DATE fields and append all records to the new table.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question