ADSM-L

Re: [ADSM-L] SQL help

2009-10-21 17:00:02
Subject: Re: [ADSM-L] SQL help
From: Fred Johanson <Fred AT UCHICAGO DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 21 Oct 2009 15:59:16 -0500
Thank you all, Remco got it.



-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Remco Post
Sent: Wednesday, October 21, 2009 3:39 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] SQL help

On 21 okt 2009, at 21:25, Fred Johanson wrote:

> Management want to count the number of nodes added in the last 2
> months.  I think this is what they want, but it returns 0
>
> select count(node_name) from nodes where (cast((date(reg_time)-
> current_date)days as decimal) <= 60)
>

select count(*) from nodes where reg_time >current_timestamp - 60 days

does that sound better to you?

>
> What did I do wrong?

--
Met vriendelijke groeten,

Remco Post
r.post AT plcs DOT nl
+31 6 248 21 622

<Prev in Thread] Current Thread [Next in Thread>