Ozgrid, Experts in Microsoft Excel Spreadsheets
Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com

Active DataXL - Download

 

AnalyserXL - Download

 

DownloaderXL - Download

 

Smart VBA - Download

 

TraderXL - Download

111+ Access SQL Queries: Example 1

 

Database A (DatesWizard) contains 39 queries (18 main queries and 21 nested queries).

These 18 queries meet almost all of your needs related to dates. All of these queries are parameter queries. In a datasheet view, you can run the query again by hitting the F9 key while holding down the shift key; there is no need for you to Start all over by closing the query and opening it again.

When you open this database, a user interface form pops up. You can use this form to open one of the 18 main queries.

The description of the 18 main queries is as follows:

1. Particular Weekdays in Each Month of a Given Year
Parameters required: year, weekday number (1-7)
Example: a list of all Fridays in 2006

2. Last Particular Weekday in Each Month of a Given Year
Parameters: year, weekday number (1-7)
Example: A list of last Tuesday in each month of 2006

3. Nth Particular Weekdays in a Given Year
Parameters: Year, weekday number (1-7)
Example: A list of 3rd Monday in each month of 2006

4. Every Other Particular Weekdays in a Given Year
Parameters: year, weekday number (1-7)
Example: A list of every other Wednesday in 2006

5. Count of Weekdays by Month
Parameters: year
Example: Count of Weekdays in each month of 2006

6. Month-end Dates in a Given Year.
Parameters: year
Example: A list of 12 month-end dates in 2006

7. Number of a Particular Weekday between Two Dates
Parameters: Start date, end date, weekday number (1-7)
Example: The number of Saturdays between 02/25/06 and 04/14/06

8. First Particular Weekday Following a Given Date
Parameters: weekday number (1-7), date
Example: 2/27/06 is the first Monday after 2/23/06

9. Number of Years between Two Dates
Parameters: first date, second date
Example: From 2/25/06 to 09/15/12, it is six years

10. How Old Am I Today?
Parameters: date (DOB)
Example: If your birth date is 7/25/76, you are 29 years old as of today (1/23/06)

11. Is It a Leap Year?
Parameters: year
Example: If the year is 2008, it is a leap year

12. USA Holidays in a Given Year
Parameters: year
Example: A list of ten Federal holidays in 1996

13. USA Holidays in the Current Year
Parameters: year
Example: A list of ten Federal holidays in 1996

14. USA Holidays (observed) in a Given Year
Parameters: year
Example: A list of ten Federal holidays as they are observed in 2006
Note: If a holiday falls on Saturday, it is observed on the preceding Friday.
If the holiday falls on Sunday, it is observed on the following Monday.

15. USA Holidays in Multi Years
Parameters: You can enter whatever years you want in a table.
Example: A list of ten Federal holidays in 2006,2007,2008

16. USA Holidays (observed) in Multi Years
Parameters: You can enter whatever years you want in a table.
Example: A list of ten Federal holidays as they are observed in 2006,2007,2008
Note: If a holiday falls on Saturday, it is observed on the preceding Friday.
If the holiday falls on Sunday, it is observed on the following Monday.

17. Working Days in USA in a Given Year.
Parameters: year
Example: A list of weekdays excluding weekends as well as the ten Federal holidays in 2006.

18. Working Days Over Next 1-3650 Days
Parameter: number of days
Example: a list of working days over next 1000 days excluding weekends.

End of example 1.

Access SQL Queries Start . Example 2  | Developers Site

111+ Power Access Queries/SQLs You will be able to download your software immediantley after purchase $39.95  Payment Options/Problems

Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $70.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to [email protected] 31 days after purchase date.

See Also: Excel Add-ins Index & Excel Templates Index or, All Software


Instant Download and Money Back Guarantee on Most Software

Microsoft Excel Training- From Beginner to Expert in 6 Hours

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft � and Microsoft Excel � are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft