Solved

MS Access query...interpreting the SQL

Posted on 2008-06-13
5
175 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

823 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