ID and Description are Reserved Keywords.
This should work
SELECT directory.[id],
directory.postcode,
directory.fullname,
directory.boxofficetelephone,
directory.town,
diary.directoryid AS directoryid,
diary.startdate,
diary.enddate,
diary.publish,
diary.[description],
diary.title,
diary.artform,
diary.ticketprice,
diary.concessions,
artforms.[id],
artforms.artform AS artform,
towns.[id],
towns.town
AS town
WHERE (
directory.postcode LIKE 'TN%' OR
directory.postcode LIKE 'CT%' OR
directory.postcode LIKE 'BR%' OR
directory.postcode LIKE 'BN%') AND
directory.[id] = diary.directoryid AND directory.town = towns.[id]
AND diary.artform = artforms.[id] AND
(( diary.startdate >= #nowdate#) OR ( diary.enddate >= #nowdate#))
AND diary.publish = 'yes'
ORDER BY diary.startdate, diary.title
-----Original Message-----
From: Ian Westbrook (FDM) [mailto:[EMAIL PROTECTED]
Sent: 08 January 2004 13:51
To: CFUG List
Subject: [ cf-dev ] fresh pair of eyes...
can anyone see what's wrong with this? I've been staring at it for half an
hour now...
I'm getting an error
[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a
reserved word or an argument name that is misspelled or missing, or the
punctuation is incorrect.
CF4.5, Access db
<cfquery datasource="#dsn#" name="events"> SELECT directory.id,
directory.postcode, directory.fullname, directory.boxofficetelephone,
directory.town, diary.directoryid AS directoryid, diary.startdate,
diary.enddate, diary.publish, diary.description, diary.title, diary.artform,
diary.ticketprice, diary.concessions, artforms.id, artforms.artform AS
artform, towns.id, towns.town AS town WHERE (directory.postcode LIKE 'TN%'
OR directory.postcode LIKE 'CT%' OR directory.postcode LIKE 'BR%' OR
directory.postcode LIKE 'BN%') AND directory.id = diary.directoryid AND
directory.town = towns.id AND diary.artform = artforms.id AND ((
diary.startdate >= #nowdate#) OR ( diary.enddate >= #nowdate#)) AND
diary.publish = 'yes'
ORDER BY diary.startdate, diary.title
</cfquery>
TIA
Ian W
This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540. It contains information which is
confidential and may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful. If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]