Databases - SQL

SQL (Structured Query Language) is used to write queries in code. Basically, this is a standard that everyone uses ... however, most DBM systems include custom extensions


MS Access (JET) SQL

The MS Access (JET) extensions allow VBA (VisualBasic for Applications) functions which return strings to be included in Select statements.

This IDC code prevents duplicate records from being entered unless the LocationBarcode starts with an 'L' (case is ignored). Notice the use of 2 Select statements.

(The constants - such as 'loc' - and computed values - Now() - are re-named so that they are available in the associated htx file.)

Normally, I use the MS Access query builder to write the SQL for me ... then I make simple mods (like adding the plus signs - +) by hand. However, notice that the MS Access query builder is not able to handle the

construct.


References


References


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / SQL.html