Re: SQL Statement help!

2003-10-10 Thread Jochem van Dieten
ColdFusion Programmer wrote: > > #DateFormat(Now()-7,"/mm/dd")# - #qTmp.DateTime# > > SELECT   UserName, SearchString, Count(SearchString) AS Occurences > FROM qTmp > WHERE    < DateTime > GROUP BY UserName, SearchString > Any NULLs in qTmp? What datatype is DateTime in the database?

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
first of all, whats this? #DateFormat(Now()-7,"/mm/dd")# - #qTmp.DateTime# dateAdd() needs to be in there for the -7 thing to work. here is the below in correct format. SELECT   UserName, SearchString, Count(SearchString) AS Occurences FROM qTmp WHERE    '#dateFormat(dateAdd('d',Now(),

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
ok so format that value, with dateFormat, enclose it in 's and you should be good. ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, Octo

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
whats the value of dateTime parse out to? ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 9:32 AM To: CF-Talk Subject

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
its because of the odbc datetime format that that will give you...the getDate function that is...and the qOfq prolly doesn't like that?  try, adding a dateFormat() around that, so that its in a format the qOfq will jive with. SELECT   UserName,  SearchString,  Count(SearchString) A

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
tions architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 8:56 AM To: CF-Talk Subject: RE: SQL Statement help! Tony Weeg wrote: > I guess standards matter in some ca

RE: SQL Statement help!

2003-10-10 Thread Jochem van Dieten
Tony Weeg wrote: > I guess standards matter in some cases, but, jochem, this is fairly > clear in its descriptive text of a function available to sql server > programmers. > > --from transact sql help docs- Transact SQL <> SQL Why do you think I explicitly refered Alla

RE: SQL Statement help!

2003-10-10 Thread Jochem van Dieten
Tony Weeg wrote: > and besides that, what are the values that you are expecting > to do a subtraction operation with? > > to me, I don't see how,  (#Now()# - DateTime) would make sense > regardless. In full featured databases, they return an interval. Unfortunately, neither Java nor JDBC has an in

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 8:39 AM To: CF-Talk Subject: RE: SQL Statement help! Tony Weeg wrote: > now() isnt a sql function, getDate() is tho' :) Neither are SQL functions (copies of ISO 9075-2:1999 are available through your national standards orga

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
getDate isnt? ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 8:39 AM To: CF-Talk Subject: RE: SQL Statement help! Tony

RE: SQL Statement help!

2003-10-10 Thread Jochem van Dieten
Tony Weeg wrote: > now() isnt a sql function, getDate() is tho' :) Neither are SQL functions (copies of ISO 9075-2:1999 are available through your national standards organisation). Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
ssage- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 8:34 AM To: CF-Talk Subject: RE: SQL Statement help! now() isnt a sql function, getDate() is tho' :) ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
now() isnt a sql function, getDate() is tho' :) ...tony tony weeg senior web applications architect navtrak, inc. www.navtrak.net [EMAIL PROTECTED] 410.548.2337 -Original Message- From: ColdFusion Programmer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 8:35 AM To: CF-Talk Su

RE: SQL Statement help!

2003-10-10 Thread Tony Weeg
"from where"  doesn't jive. SELECT UserName, SearchString, Count(SearchString) AS Occurences FROM yourTableName WHERE (#DateFormat(Now(),"/mm/dd")# #TimeFormat(Now(),"HH:mm:ss")# - #qTmp.DateTime#) < 7 qTmp GROUP BY UserName, SearchString replace, yourTableName, with, wellyour t

Re: SQL Statement help!

2003-10-10 Thread Jochem van Dieten
Allan Clarke wrote: > > I have this table that keps a log > of the user search activity. For ex, on the site > search page of the site, if a user searches for > a keyword "test", it gets stored on the database table > along with other details like the > username, date/time, search category and the

SQL Statement help!

2003-10-10 Thread Allan Clarke
I was wondering if the SQL gurus out there could help. I have this table that keps a log of the user search activity. For ex, on the site search page of the site, if a user searches for a keyword "test", it gets stored on the database table along with other details like the username, date/time, sea