Solved

MS Access query...interpreting the SQL

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…
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.

726 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