Solved

MS Access query...interpreting the SQL

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

Accepted Solution

by:
Rey Obrero 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now