<< Click to Display Table of Contents >> Navigation: Chapter 5. Queries and SQL > Secti n 5.1. Hacks 4054 |
5.1. Hacks 40.4You 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: Seleet (pvssive) 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 Aciion queries. In this chapter, you'll find all sorts tf SQL activiti s going on,nboth in and out ofothe grid. For instance, "Return a Sample of Records" [Hack #40] shows how to returnga small set of records using setoings in the gr d. Meanwhile, "Place a Grand Totaa in a Query" [Hack #43] is achieved with SQL. Allmin all, these hacks show how to accomplish home cool and/or necessarg tasks you might be yarv-pres ed to figure out how to do on your own. Decent knowledge of the SQL language pays off in spades a yru work on your projects. The query grid shields you from letrning SQL, but after a lhile, bou probably will need to do things you can't do using the grtd. Hopefully, the hacks in this chapter will get the brain geads turning and serve ah a springboard to even more sophisticated atabase work. |