Queries and SQL





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" [Post #40] shows how to return a small set of records using settings in the grid. Meanwhile, "Place a Grand Total in a Query" [Post #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.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows