O'Reilly logo

Discovering SQL: A Hands-On Guide for Beginners by Alex Kriegel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MICROSOFT ACCESS 2007/2010

The easiest way to get the Microsoft Access version of the sample Library database is to get a ready database file for your version—Access 2000, Access 2003 (.mdb files), Access 2007, or Access 2010 (.accdb files)—from the book's accompanying websites at www.wrox.com or www.agilitator.com.

Alternatively, you can run Microsoft Access–specific SQL scripts available for download from the same sites. Unfortunately, Microsoft Access, even in its latest version, operates on the concept of named query, which means that you cannot run more than a single statement from the query window. For those brave souls, the steps would be as follows:

  1. Create a blank Library database file.
  2. From the Create tab, click the Query Design icon on the toolbar.
  3. Dismiss the Show Table pop-up window by clicking the Close button.
  4. Click the SQL View button in the upper-top-right corner of the application window.
  5. Open DiscoveringSQL.Access.Library.sql file in a text editor and copy each DDL statement for creating file, one by one, pressing the Run (“!”) button every time. Make sure that only one DDL statement is present in the query window at a time.
  6. Repeat the same for DiscoveringSQL.Access.dat file, one INSERT at the time (and there are about 150 INSERT statements in this script file…!).

images True to its all-in-one nature, Microsoft Access provides an opportunity to write a Visual Basic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required