Re: Need help with query with dates please

2005-01-31 Thread Umer Farooq
assuming you have two date variables.. startDate and endDate.. WHERE (day > #day(startDate)#) AND (month > #month(startDate)#) AND (day < #day(endDate)#) AND (month < #month(endDate)#) Mike Kear wrote: > I have a database containing a list of events (birthdays, > anniversaries etc), and

Re: Need help with Query

2004-02-08 Thread Jochem van Dieten
Jake. wrote: >>SELECT >> AVG(r.rating) AS rating, >> r.LinkIDFK2 >>FROM >> Reviews r INNER JOIN Traffic t >> ON r.LinkIDFK2 = t.LinkIDFK >>GROUP BY >> LinkIDFK2 >>ORDER BY >> AVG(r.rating) DESC, >> t.Hits DESC > > > Sorry, same problem: > > [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsof

Re: Need help with Query

2004-02-07 Thread Jochem van Dieten
Jake. wrote: >> SELECT >> AVG(r.rating) AS rating, >> r.LinkIDFK2 >> FROM >> Reviews r INNER JOIN Traffic t >> ON r.LinkIDFK2 = t.LinkIDFK >> GROUP BY >> LinkIDFK2 >> ORDER BY >> rating DESC, >> t.Hits DESC >> >> Depending on your database you can usually limit the numer of >> results by

Re: Need help with Query

2004-02-07 Thread Jochem van Dieten
Jake McKee wrote: > > I'm trying to find the highest rated items (max of 10 and based on an > average of all the times that item was rated). Since many of the top > rated items will have the same rating, and I need to choose the "top" > 10, I further want to base it on traffic to that item. > >

RE: Need Help With Query

2003-03-05 Thread Cantrell, Adam
SELECT * FROMTheTable WHERE TheTextField LIKE '%#SearchString#%' And yes, you will want to 'encode' the variable inside a tag, otherwise you'll wake up one morning with "hacked by the chinese" on your home page. Adam. > -Original Message- > From: Eric Homa [mailto:[EMAIL PROTE