What's wrong with this SQL statement?

  • Thread starter Thread starter Gator
  • Start date Start date
G

Gator

I'm using Access 2000. Do the table fields HAVE to be in [] or stated with
the table name in front of the fieldName....even though the table is stated ?

SELECT
Date,
05PpCert, 05PpTaxPaid,
06PpCert, 06PpTaxPaid,
07PpCert, 07PpTaxPaid,
08PpCert, 08PpTaxPaid,
03RpCert, 03RpTaxPaid,
04RpCert, 04RpTaxPaid,
05RpCert, 05RpTaxPaid,
06RpCert, 06RpTaxPaid,
07RpCert, 07RpTaxPaid,
08RpCert, 08RpTaxPaid
FROM Collections;
 
The only thing I see that would cause a problem is the use of Date as a field
name. Date is a function that returns the current date or can be used to set
the system date.

If you are going to use it as a field name, you really need to surround it
with square brackets or specify the table name - {Date] or Collections.Date or
to be totally safe [Collections].[Date].


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top