I don't think it likes the double quotes around Section - tblStudentCourses."Section"
Be sure to pad your forehead before slapping. -- Josh ----- Original Message ----- From: "Will Tomlinson" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Wednesday, March 14, 2007 2:20 PM Subject: Access SQL > MySQL SQL code > I'm converting an access db over to MySQL, and getting an error: > > Here's the code: > > SELECT tblStudentCourses.SectionID, tblStudentCourses.StudentID, > tblStudentCourses.Program, tblStudentCourses.Title, > tblStudentCourses."Section", tblStudentCourses.Submit FROM > tblStudentCourses > WHERE tblStudentCourses.StudentID = '#SESSION.CollegeID#' > AND (tblStudentCourses.Submit = '' OR tblStudentCourses.Submit Is Null) > > Error Executing Database Query. > [Macromedia][SequeLink JDBC Driver][ODBC Socket][MySQL][ODBC 3.51 > Driver][mysqld-5.0.24-community-nt]You have an error in your SQL syntax; > check the manual that corresponds to your MySQL server version for the > right syntax to use near '"Section", tblStudentCourses.Submit FROM > tblStudentCourses WHERE tblStudentCours' at line 1 > > The error occurred in > C:\CFusionMX7\wwwroot\Eval\evalForm\studentCourses.cfm: line 6 > Called from C:\CFusionMX7\wwwroot\Eval\Application.cfc: line 33 > Called from C:\CFusionMX7\wwwroot\Eval\evalForm\studentCourses.cfm: line 6 > Called from C:\CFusionMX7\wwwroot\Eval\Application.cfc: line 33 > > 4 : <cfquery name="rs1" datasource="#SESSION.DSN#"> > 5 : SELECT tblStudentCourses.SectionID, tblStudentCourses.StudentID, > tblStudentCourses.Program, tblStudentCourses.Title, > tblStudentCourses."Section", tblStudentCourses.Submit FROM > tblStudentCourses > 6 : WHERE tblStudentCourses.StudentID = '#SESSION.CollegeID#' > 7 : AND (tblStudentCourses.Submit = '' OR tblStudentCourses.Submit = Null) > 8 : </cfquery> > > I've played round with it some with no luck. Any ideas? > > Thanks much! > Will > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272705 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

