Not "... and where ..." just "... and ...". I think you'll also need to surround your date literal with # rather than ' - assuming it's Access.
You should debug your query under Access itself then transfer the SQL into your ASP. Dave S ----- Original Message ----- From: jenksonu To: [EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 6:35 PM Subject: [ASP] Re: asp search help Here is my full code. I now get (missing operator) in query expression 'table1.userid='crollins' and where table2.fldDate > '5/10/2004 3:28:16 AM''. dbRs.Open "Select table2.* from table2 inner join table1 on (table2.fldusername = table1.userid) where table1.userid='" & sUserId & "' and where table2.fldDate > '" & CDate(Now() - 30) & "' ORDER BY table2.flddate DESC, table2.fldTimeIn ASC", strCon, 0, 1 --- In [EMAIL PROTECTED], "Eric Goforth" <[EMAIL PROTECTED]> wrote: > This should work: > > > Select table2.* from table2 inner join table1 on (table2.fldusername > = table1.userid) where table1.userid='" & sUserId & "' and where table2.fldDate > '" & CDate(Now() - 30) & "'" > --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Sponsor ADVERTISEMENT ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.700 / Virus Database: 457 - Release Date: 6/06/2004 [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
