question about CFSCHEDULE. Hope your day is going well.
Eric
-Original Message-
From: Leigh [mailto:cfsearch...@yahoo.com]
Sent: Wednesday, November 14, 2012 11:03 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one year
old?
> cast(dateadd('y'
Yep, there is always more than one way to skin a cat. (Ouch... poor cats)
-Leigh
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://w
a purely MSSQL way would be
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, DATEADD(yy, -1, GETDATE(
since 2005 doesn't support that.
On Wed, Nov 14, 2012 at 11:02 AM, Leigh wrote:
>
> > cast(dateadd('y', -1, getdate()) as date) as -- getdate() in MSSQL
>
> I do not think 2005 supports the "date"
> cast(dateadd('y', -1, getdate()) as date) as -- getdate() in MSSQL
I do not think 2005 supports the "date" type. A CF alternative is using
dateAdd("", -1, now()) to get the date and time one year ago. Then use
cfqueryparam with type "cf_sql_date" which automatically drops any time portio
Greg, thank you very much. I will try this out and report my progress later
this evening.
Eric
-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com]
Sent: Wednesday, November 14, 2012 7:52 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one
try that first one, I assume your date column in the DB is storing just the
date and not the datetime?
if it's storing datetime there would be a problem and you'd have to cast
that as a date too.
On Wed, Nov 14, 2012 at 7:52 AM, Greg Morphis wrote:
> cast(dateadd('y', -1, getdate()) as date) a
cast(dateadd('y', -1, getdate()) as date) as -- getdate() in MSSQL
or
trunc(dateadd('y', -1, sysdate)) -- sysdate in Oracle
On Wed, Nov 14, 2012 at 7:46 AM, Greg Morphis wrote:
> What DB are you using?
>
>
> On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland wrote:
>
>>
>> Greetings. I need s
MS SQL Server 2005
ColdFusion 9.0.1
-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com]
Sent: Wednesday, November 14, 2012 7:46 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one year
old?
What DB are you using?
On Wed, Nov 14, 2012 at
What DB are you using?
On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland wrote:
>
> Greetings. I need some advice again. I need to use CFSCHEDULE to schedule a
> task that does the following:
>
>
>
> * review all records in table 'membersTable', once per day
>
> * return records that are one year
Greetings. I need some advice again. I need to use CFSCHEDULE to schedule a
task that does the following:
* review all records in table 'membersTable', once per day
* return records that are one year (365 days) old, then two years old, then
three, and so on in increments of years
* send a re
- Original Message -
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 7:56 PM
Subject: Query How-To
> How can I go about ordering the following query by first name?
>
>
> SELECT
: Wednesday, January 22, 2003 6:34 PM
Subject: RE: Query How-To
> ORDER BY name
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.
le, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
"Let's Roll"
- Todd Beamer, Flight 93
-Original Message-
From: Jim McAtee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 4:56 PM
To: CF-Tal
Just put e.firstname in as one of the SELECTed fields, i.e.
SELECT DISTINCT t.employeeid, e.firstname + e.lastname AS name,
e.firstname
> -Original Message-
> From: Jim McAtee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 23 January 2003 1:56 p.m.
> To: CF-Talk
> Subjec
Remove the parens around t.employeeid ?
DISTINCT applies to ALL columns requested, not just one. So DISTINCT can
work correctly and return duplicate t.employeeid's (if there are dups in
the data).
To get DISTINCT t.employeeid's, you'll have to run this query first:
SELECT DISTINCT t.employeeid
How can I go about ordering the following query by first name?
SELECT DISTINCT(t.employeeid),
e.firstname + e.lastname AS name
FROM transactions t
LEFT JOIN employees e ON t.employeeid = e.employeeid
The following query throws an error about a conflict between the ORDER BY and
DISTI
> I was under the impression that cachedafter was just what it says. Cache
> the query *after* a date for all eternity. Why would you "cache until" a
> date when cachedwithin already does that? ;)
Sort of - It's useful if you know that you've got a cached query that will
never change, such as a
>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 5:21 PM
Subject: RE: Caching a Query: How To?
> Shouldn't CachedAfter really be called CachedBefore?
>
> You are telling it to cache the query UNTIL a specified date/time, right?
>
> At 05:27
> Shouldn't CachedAfter really be called CachedBefore?
"CACHEDUNTIL" would be more accurate than either.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~
Structure your ColdFusion code with Fu
F-Talk <[EMAIL PROTECTED]>
Subject: Caching a Query: How To?
Date: Fri, 12 Jan 2001 11:00:07 -0500
Received: from [207.31.122.140] by hotmail.com (3.2) with ESMTP id
MHotMailBC287BC70067D820F3B7CF1F7A8C43110; Fri Jan 12 08:29:01 2001
Received: from houseoffusion.com ([207.31.122.140])
The CachedAfter parameter actually caches the query any time *After*
the date/time given.
The query remains in the cache *until* the query is reissued with a
later date /time. (Assuming the query is not purged because of it
being LRU and cache space is needed)
This is very useful to cause cac
Shouldn't CachedAfter really be called CachedBefore?
You are telling it to cache the query UNTIL a specified date/time, right?
At 05:27 PM 1/12/01 +, Philip Arnold - ASP wrote:
>> I have three different queries on page that the only difference among
>> them is what the results are ordered by
Use the cachedwithin (relative time) or cachedafter (absolute time)
attributes of the cfquery tag.
-Original Message-
From: James Taavon [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 11:00 AM
To: CF-Talk
Subject: Caching a Query: How To?
I have three different queries on
> I have three different queries on page that the only difference among
> them is what the results are ordered by. I suppose that I can cache the
> query the so when the user selects how they want the list sorted, the
> process time will be decreased. My question is I need help because I
> have ne
]
http://www.crescotech.com
-Original Message-
From: James Taavon [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 11:00 AM
To: CF-Talk
Subject: Caching a Query: How To?
I have three different queries on page that the only difference among
them is what the results are ordered
I have three different queries on page that the only difference among
them is what the results are ordered by. I suppose that I can cache the
query the so when the user selects how they want the list sorted, the
process time will be decreased. My question is I need help because I
have never done i
26 matches
Mail list logo