I am a little confused as to how to code a WHERE statement that has more than one qualifier. See this code: <CFQUERY NAME="qGetStatus" DATASOURCE="VISN"> SELECT Location, Date_rcvd, status, Certificate_Number FROM 39_TRACKING WHERE Location = '#form.location#' AND status = '#form.status#" AND date_rcvd> #DateFormat(CreateODBCDate(Form.firstdate), 'm/d/yyyy')# AND date_rcvd < #DateFormat(CreateODBCDate(Form.seconddate), 'm/d/yyyy')# Group By location, date_rcvd, status, certificate_number </CFQUERY> The queary does not work. Do I need to use parentheses in a WHERE statement with a number of AND's? Is it even a good idea to use this many AND's or is there another way I should be doing this? Tim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists