If you want data from the Start Date forward, your WHERE clause probably should have something like this:j_startdate >= CONVERT(DATETIME,'2/26/2005 11:46:38 AM',102)
or maybe this to get from the beginning of the start date forwardj_startdate >= convert(datetime,convert(varchar(30), convert(datetime,'2/26/2005 11:46:38 AM'),102))
Also, what is the point of 1=1 in the WHERE clause?quote:
Originally posted by mm512
ok three inputskeyword = stringstateid = intand date = intlooks something like thisSELECT * FROM cj_jobs INNER JOIN cj_employers ON cj_jobs.j_e_id = cj_employers.e_id WHERE 1=1 AND j_title LIKE '%Test%' OR j_description LIKE '%Test%' AND j_startdate = CONVERT(DATETIME,'2/26/2005 11:46:38 AM',102) AND j_enabled = 1 ORDER BY j_featuredjob DESC;but too many results come back. Any help is greatly appreciated.I want it to return first an foremost the enabled jobs then the ones from the startdate forward then the ones that match the keyword or stateid querries... Thanks