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
|