"session.division" should not be a field name in your database....if it is you should change it ;-)
Oh ya...and it's standard practice to store user names broken out into first/last/initial fields (you can add suffix and prefix as well for Dr. and Charles III). Cheers Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ----- Original Message ----- From: "Ian Vaughan" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Tuesday, February 22, 2005 6:08 AM Subject: SQL Problem > Hi > > Can anybody help on why the following query is returning the error > "missing expression ???? shown below ? > > If I remove the AND session.division='ss' the query works fine ? > > Any ideas ? > > > <CFQUERY DATASOURCE="#Application.DSN#" NAME="update"> > SELECT docid, doctitle, docdate > FROM doc > WHERE username ='#Session.Fname# #Session.Lname#' > AND > directorate='team' > AND > session.division='ss' > > ORDER BY docid desc, docdate desc > </CFQUERY> > > > > > Error Executing Database Query. > [Macromedia][Oracle JDBC Driver][Oracle]ORA-00936: missing expression > > The error occurred in \publishing\doclisting.cfm: line 16 > > 14 : SELECT docid, doctitle, docdate > 15 : FROM docs > 16 : WHERE username ='#Session.Fname# #Session.Lname#' > 17 :AND > 18 : directorate='ssh' > > > > > TIA > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195893 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

