Re: (ot) sql help

2010-10-15 Thread Michael J. Sprague
Figured it out. I was missing a join. Should have been: SELECT DISTINCT phases.phase AS phaseLabel, narratives.title, narratives.id, narratives.content, phases.id AS phaseId FROM( ( nsftool.phases2company phases2company

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Matthew Small wrote: > I think it's just as simple to say > > Select * from table where > date >= '1/1/2005' and > date < '3/1/2005' The query is, but the way you get there dynamically is not, ecause you have to figure out what the next month is. So if your parameters are 1 2005

RE: OT - Sql Help

2005-02-17 Thread Matthew Small
I think it's just as simple to say Select * from table where date >= '1/1/2005' and date < '3/1/2005' - Matt Small -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 11:50 AM To: CF-Talk Subj

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Charlie Griefer wrote: > oooh...that's cleaner than mine :) Maybe, some databases have the gall not to have Month() and Day() functions... postgres has neither... mysql didn't have Day() until 4.1.something.. although they had DayOfWeek(). Plus, if you want to use indexes, you can't do it the w

Re: OT - Sql Help

2005-02-17 Thread Mickael
Hi Rick, That is simple. Thanks just what I was looking for - Original Message - From: "Rick Root" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Thursday, February 17, 2005 11:26 AM Subject: Re: OT - Sql Help > Mickael wrote: > > > > select *

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
oooh...that's cleaner than mine :) On Thu, 17 Feb 2005 11:26:52 -0500, Rick Root <[EMAIL PROTECTED]> wrote: > Mickael wrote: > > > > select * from table where date between Jan2005 and feb2005 ( so in essence > > not having to say Jan 1, 2005 and Feb 28, 2005) > > How about: > > WHERE >

RE: OT - Sql Help

2005-02-17 Thread Eric Creese
I created a table called test with two columns tid(identity int) and tdate(datetime filled it with date values. This is in SQL2k SELECT * FROM test where datepart(month,tdate) Between 1 and 2 and datepart(year,tdate) =2005 -Original Message- From: Mickael [mailto:[EMAIL PROTE

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
try something like: SELECT * FROM table WHERE date BETWEEN (#createODBCDate(variables.from_date))# AND #createODBCDate(variables.to_date)#) btw...i'm hoping 'date' isn't actually your column name. it's a reserved word and will cause you pain and heartache :) On Thu, 17 Feb 2005 11:19:29 -050

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Mickael wrote: > > select * from table where date between Jan2005 and feb2005 ( so in essence > not having to say Jan 1, 2005 and Feb 28, 2005) How about: WHERE MONTH(date) >= 1 and YEAR(date) >= 2005) and MONTH(date) <= 2 and YEAR(date) <= 2005 ~~

Re: [OT] SQL help

2004-05-27 Thread Spectrum Web
Thnx Matthew works great brilliant! Success! >Try this (where age is the formula you're already using). I'd recommend >making a view that has the age as one of the columns. > >SELECT > >CASE WHEN age <= 16 THEN 1 >   WHEN age BETWEEN 17 AND 25 THEN 2 >   WHEN age BETWEEN 26 AND 40

RE: [OT] SQL help

2004-05-27 Thread John Stanley
You are welcome. ;-) -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:17 AM To: CF-Talk Subject: RE: [OT] SQL help Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM To

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM To: CF-Talk Subject: RE: [OT] SQL help Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk

RE: [OT] SQL help

2004-05-27 Thread Philip Arnold
> From: Monique Boea > > what is OT? Off Topic [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: [OT] SQL help

2004-05-27 Thread John Stanley
Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk Subject: RE: [OT] SQL help what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like this: Gro

RE: [OT] SQL help

2004-05-25 Thread Matthew Walker
Try this (where age is the formula you're already using). I'd recommend making a view that has the age as one of the columns. SELECT CASE WHEN age <= 16 THEN 1    WHEN age BETWEEN 17 AND 25 THEN 2    WHEN age BETWEEN 26 AND 40 THEN 3    ELSE 4 END  AS [group] ___

RE: OT: SQL HELP

2004-02-18 Thread Tim Do
yes.. permissions are there. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 4:40 PM To: CF-Talk Subject: Re: OT: SQL HELP The ID your using have permissions on the table?   _ [Todays Threads] [This Message] [Subscription

Re: OT: SQL HELP

2004-02-18 Thread Casey C Cook
The ID your using have permissions on the table? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: OT: SQL help

2003-08-27 Thread Jochem van Dieten
Mark A. Kruger - CFG wrote: > What?? what about cursors? This seems pretty easy in SQL if you ask me. I should have been more specific. You can't do it in SQL in MS SQL Server. You need to use some non-standard T-SQL facilities. Jochem ~~~

RE: OT: SQL help

2003-08-26 Thread Mark A. Kruger - CFG
What?? what about cursors? This seems pretty easy in SQL if you ask me. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 4:08 PM To: CF-Talk Subject: Re: OT: SQL help Michael Hodgdon wrote: > > Before I begin, I know this is simp

Re: OT: SQL help

2003-08-26 Thread Jochem van Dieten
Michael Hodgdon wrote: > > Before I begin, I know this is simple and remedial in CF, but I specifically > want a SQL solution (if necessary, it can be a Transact SQL solution) > > Basically, I want to loop over a query using SQL syntax just like you would > loop over a query using or tags. Tha

RE: OT: SQL Help

2003-03-19 Thread JS
I found the solution. I needed a where statement on the uid field. where table1.uid = table2.uid Thanks, JS __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

Re: OT: SQL Help

2003-01-23 Thread ksuh
The problem is that you're using cursors. Cursors in SQL Server are very, very slow. Come up with an alternate way of doing your import. - Original Message - From: Duane Boudreau <[EMAIL PROTECTED]> Date: Thursday, January 23, 2003 9:02 am Subject: OT: SQL Help > Hi All, > > I need t

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
nal Message- From: Matthew Small [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:48 PM To: CF-Talk Subject: RE: OT - SQL Help You to see exactly what SQL Statement being sent to the db. How about displaying the sql string before it is processed and send that to the list.

RE: OT - SQL Help

2002-12-02 Thread Rob Rohan
tp://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:56 AM To: CF-Talk Subject: RE: OT - SQL Help I just removed all the asp stuff and this is what gets sent. SELECT * FROM SomeTable WHERE (E

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
Registered = 1 Matthew Small IT Supervisor Showstopper National Dance Competitions 3660 Old Kings Hwy Murrells Inlet, SC 29576 843-357-1847 http://www.showstopperonline.com -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:56 PM To: CF-T

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
ssage- From: Matthew Small [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:48 PM To: CF-Talk Subject: RE: OT - SQL Help You to see exactly what SQL Statement being sent to the db. How about displaying the sql string before it is processed and send that to the list. Matthew S

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
://www.showstopperonline.com -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:38 PM To: CF-Talk Subject: RE: OT - SQL Help Exactly!!! But it is not working that way. I just sent a previous email explaining this. -Original Message- From: Dave Watts

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
Exactly!!! But it is not working that way. I just sent a previous email explaining this. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:36 PM To: CF-Talk Subject: RE: OT - SQL Help > Sorry for the OT but this should be a quick ans

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
L PROTECTED] I should be able to log in but the problem is that it only accepts the primary email address. Hope this clears it up. Thanks, Tony -Original Message- From: Matthew Small [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:22 PM To: CF-Talk Subject: RE: OT - S

RE: OT - SQL Help

2002-12-02 Thread Dave Watts
> Sorry for the OT but this should be a quick answer. > This is in ASP (sorry). > > If I have the following: > sql = "SELECT * FROM SomeTable " > sql = sql & "WHERE Email = '" & Request("un") & "'" > sql = sql & " OR SEmail = '" & Request("un") & "'" > sql = sql & " AND IsDeleted = 0 " >

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
:14 PM To: CF-Talk Subject: RE: OT - SQL Help No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells po

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
:14 PM To: CF-Talk Subject: RE: OT - SQL Help No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells po

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells post sort it? -Original Message-

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
my ASP's not what it used to be! - so did Randells post sort it? -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 17:59 To: CF-Talk Subject: RE: OT - SQL Help Dave's absolutely right. I am a lil' lazy. The less typin

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
Dave's absolutely right. I am a lil' lazy. The less typing the better! 8^) -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 12:56 PM To: CF-Talk Subject: RE: OT - SQL Help > Sorry - I wasn't particularly clear. What I

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
This and CFDJList are the only good lists that are out there where everyone is more than helpful and help/answers are extrememly quick. -Original Message- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 12:38 PM To: CF-Talk Subject: RE: OT - SQL Help That is

RE: OT - SQL Help

2002-12-02 Thread Dave Watts
> Sorry - I wasn't particularly clear. What I meant to > say was that the request object has a number of > collections associated with it (form, querystring, > etc...). When I have used the request object I have > always referenced an element of one of these collections > e,g, request.form("un

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
2002 17:25 To: CF-Talk Subject: RE: OT - SQL Help No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean b

RE: OT - SQL Help

2002-12-02 Thread Rob Rohan
:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 9:25 AM To: CF-Talk Subject: RE: OT - SQL Help No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope are you

RE: OT - SQL Help

2002-12-02 Thread Robertson-Ravo, Neil (RX)
its using Structure notation. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 16:46 To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope are you trying to r

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope are you trying to request the variable un from? Is it a form variable or url? Normally you'd access these using Request.Form("un") (for form vars) If they are local vars then just reference them as "un". Not

Re: OT - SQL Help

2002-12-02 Thread Randell B Adkins
You ( ) around your OR statements Example: sql = "SELECT * FROM SomeTable " sql = sql & "WHERE (Email = '" & Request("un") & "'" sql = sql & " OR SEmail = '" & Request("un") & "')" sql = sql & " AND IsDeleted = 0 " sql = sql & " AND Password = '" & Request("pw") & "'" sql = sql & " AN