Chapter 5. Queries and SQL
Hacks 40–54
You can accomplish a lot with the Access query grid. You can achieve even more by working directly in the SQL pane. Queries are categorized into two types:
Select (passive) queries and
Action queries. You use
Select queries to pull data records out of tables. You use
Action queries to do something with or to the data. You can run both types of queries in the query grid, but only up to a point. For example, to use a Union query you must use straight SQL statements. You also must use the SQL language for certain sophisticated Action queries.
In this chapter, you'll find all sorts of SQL activities going on, both in and out of the grid. For instance, "Return a Sample of Records" [Hack #40] shows how to return a small set of records using settings in the grid. Meanwhile, "Place a Grand Total in a Query" [Hack #43] is achieved with SQL.
All in all, these hacks show how to accomplish some cool and/or necessary tasks you might be hard-pressed to figure out how to do on your own. Decent knowledge of the SQL language pays off in spades as you work on your projects. The query grid shields you from learning SQL, but after a while, you probably will need to do things you can't do using the grid. Hopefully, the hacks in this chapter will get the brain gears turning and serve as a springboard to even more sophisticated database work.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access