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
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
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
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
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 *
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
>
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
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
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
~~
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
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
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
> From: Monique Boea
>
> what is OT?
Off Topic
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
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
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
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]
___
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
The ID your using have permissions on the table?
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
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
~~~
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
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
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
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
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.
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
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
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
://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
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
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
> 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 "
>
: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
: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
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-
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
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
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
> 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
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
:[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
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
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
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
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
44 matches
Mail list logo