Solved

MS Access query...interpreting the SQL

Posted on 2008-06-13
5
176 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
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 125 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

829 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