OT: Easy SQL Question

2007-01-05 Thread Che Vilnonis
I have a column in a db with a list of dates called emaildates. (i.e.: 1/10/2007,1/17/2007,1/24/2007) I also define today's date as cfset todaysDate = DateFormat(Now(), M/D/) / before the cfquery. I am trying to find all entries where todaysDate is part of the list of dates. My query is

Re: OT: Easy SQL Question

2007-01-05 Thread Damien McKenna
On 1/5/07 9:01 AM, Che Vilnonis wrote: cfquery name=getScheduledEmails datasource=#DSN# SELECT esid, emailtype, emaildates, filterdomains, emailsubject, emailbody, timessent FROM EmailScheduler WHERE emaildates like '%,#todaysDate#,%' or emaildates like '#todaysDate#,%' or emaildates

RE: OT: Easy SQL Question

2007-01-05 Thread Che Vilnonis
: Friday, January 05, 2007 9:22 AM To: CF-Talk Subject: Re: OT: Easy SQL Question On 1/5/07 9:01 AM, Che Vilnonis wrote: cfquery name=getScheduledEmails datasource=#DSN# SELECT esid, emailtype, emaildates, filterdomains, emailsubject, emailbody, timessent FROM EmailScheduler WHERE emaildates like

RE: OT: Easy SQL Question

2007-01-05 Thread Adkins, Randy
To: CF-Talk Subject: Re: OT: Easy SQL Question On 1/5/07 9:01 AM, Che Vilnonis wrote: cfquery name=getScheduledEmails datasource=#DSN# SELECT esid, emailtype, emaildates, filterdomains, emailsubject, emailbody, timessent FROM EmailScheduler WHERE emaildates like '%,#todaysDate

Re: OT: Easy SQL Question

2007-01-05 Thread Jim Wright
Che Vilnonis wrote: Thanks Damien. I was stuck on using the IN clause which was not working. I switched to LIKE and it works. Actually, it works w/o the commas and only one where clause. i.e. - WHERE emaildates like '%#todaysDate#%' Be careful with that, because if your data is...

RE: OT: Easy SQL Question

2007-01-05 Thread Che Vilnonis
-Original Message- From: Jim Wright [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 9:41 AM To: CF-Talk Subject: Re: OT: Easy SQL Question Che Vilnonis wrote: Thanks Damien. I was stuck on using the IN clause which was not working. I switched to LIKE and it works. Actually

Re: OT: Easy SQL Question

2007-01-05 Thread Damien McKenna
On 1/5/07 9:25 AM, Che Vilnonis wrote: Thanks Damien. No problem. Actually, it works w/o the commas and only one where clause. i.e. - WHERE emaildates like '%#todaysDate#%' I wrote the query to prevent problems where you query previous dates, e.g. where you are querying for e.g. 1/15/06 and

Easy SQL query, brain died

2001-11-26 Thread Robert Everland
Here is what I am trying to do. I have a table that lists types of stuff. In another table I refer to this stuff. So say one record will refer to stuff 1. another to stuff 2, but maybe no stuff 3 how would I make a query to show stuff 1 = 1 stuff 2 = 1 stuff 3 = 0 My brain isn't

Re: Easy SQL query, brain died

2001-11-26 Thread corrigan
-Talk Sent: Monday, November 26, 2001 1:39 PM Subject: Easy SQL query, brain died Here is what I am trying to do. I have a table that lists types of stuff. In another table I refer to this stuff. So say one record will refer to stuff 1. another to stuff 2, but maybe no stuff 3 how

RE: Easy SQL query, brain died

2001-11-26 Thread Alex Santantonio
Macromedia Coldfusion 5 Certified Professional Macromedia Certified Web Site Developer [EMAIL PROTECTED] www.doceus.com -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Monday, November 26, 2001 2:39 PM To: CF-Talk Subject: Easy SQL query, brain died Here

RE: Easy SQL query, brain died

2001-11-26 Thread Robert Everland
PROTECTED]] Sent: Monday, November 26, 2001 2:57 PM To: CF-Talk Subject: Re: Easy SQL query, brain died Is this it? SELECT ts.*, tr.* FROMtbl_stuff ts, tbl_stuffReference tr WHERE ts.id_stuff = tr.id_stuff Hope it helps Michael Corrigan Programmer Endora Digital Solutions

Re: Easy SQL query, brain died

2001-11-26 Thread Alex
use an outer join On Mon, 26 Nov 2001, Robert Everland wrote: Here is what I am trying to do. I have a table that lists types of stuff. In another table I refer to this stuff. So say one record will refer to stuff 1. another to stuff 2, but maybe no stuff 3 how would I make a query

Re: (Easy SQL)

2001-04-17 Thread Michael Lugassy
getdate() for now() getdate(-1) for yesterday and so on - Original Message - From: "Eric Dawson" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Monday, April 16, 2001 9:08 PM Subject: (Easy SQL) I have a member table which contains userid, signup_datetim

RE: (Easy SQL)

2001-04-17 Thread Hayes, David
Take a look at the convert function. convert(char(8), signup_datetime, 1) as signup_date should give you what you want. -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:09 PM To: CF-Talk Subject: (Easy SQL) I have a member table which

(Easy SQL)

2001-04-16 Thread Eric Dawson
I have a member table which contains userid, signup_datetime I want to create a daily summary of registrations. select signup_datetime as justDatenotTime,count(userID) as NewMembers from membertable group by justDatenotTime == * == I know this has to be simple, but I can't find the syntax. How

RE: (Easy SQL)

2001-04-16 Thread John Wilker
a.com http://www.red-omega.com Pepsi's "Come Alive With the Pepsi Generation" translated into "Pepsi Brings Your Ancestors Back From the Grave" in Chinese. -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:09 PM To: CF-Tal

RE: (Easy SQL)

2001-04-16 Thread Eric Dawson
of record that are returned by using SQL aggregate functions. It seems like there should be a way to easily group by justthedatepartofadatetimefield but I can't find any syntax to do it. Eric From: "John Wilker" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Su

RE: (Easy SQL)

2001-04-16 Thread Matt Eschenbaum
Floor Seattle, WA 98101 -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:00 PM To: CF-Talk Subject: RE: (Easy SQL) hmmm. I am getting a "'dateformat' not a recognized function" error. So I need the SQL statement similar to selec

RE: (Easy SQL) Case Sensitive?

2001-04-16 Thread Erika L Walker
ensitivity. Is this correct? Erika "Twixt optimist and pessimist, The difference is droll; The optimist sees the doughnut, The pessimist, the hole." - McLandburgh Wilson -Original Message- From: John Wilker [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 4:26 PM To: CF-Talk Su