You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Gabriele Kahlout <ga...@mysimpatico.com> on 2010/04/10 11:23:12 UTC

feature request: DATE(CURRENT_DATE)

Hello,

I'm trying to retrieve the CURRENT_DATE from the DATE() function. Is
there how to do it, without of course specifying it?

-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer
OR with " ACK" appended to this subject within 48 hours. Otherwise, I
might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a
priori senders, or if the subject of this email ends with a code, eg.
-LICHT01X, then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).

Re: feature request: DATE(CURRENT_DATE)

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
On 04/10/10 12:55 PM, Gabriele Kahlout wrote:
> yes, I read that. But I want to just get the date. Sth like SELECT DATE('now');
> One could do (apparently) VALUES CURRENT_DATE but that would not work
> for DATE(VALUES CURRENT_DATE);
>   

Hi Gabriele,

It seems you got the syntax wrong:

ij> VALUES DATE(CURRENT_DATE);
1        
----------
2010-04-10

1 row selected

Hope this helps,

-- 
Knut Anders


Re: feature request: DATE(CURRENT_DATE)

Posted by Gabriele Kahlout <ga...@mysimpatico.com>.
yes, I read that. But I want to just get the date. Sth like SELECT DATE('now');
One could do (apparently) VALUES CURRENT_DATE but that would not work
for DATE(VALUES CURRENT_DATE);

It would help if DATE(CURRENT_DATE) or DATE('now') returned what
CURRENT_DATE does.

2010/4/10, Tiago Espinha <ti...@yahoo.co.uk>:
> Hello Gabriele,
>
> Based on the documentation at
> http://db.apache.org/derby/docs/10.5/ref/rrefsqlj34177.html it seems that
> CURRENT_DATE is itself a function.
>
> So you can do:
> SELECT * FROM Flightavailability where flight_date > CURRENT_DATE;
>
> Hope it helps,
> Tiago
>
>
> ----- Original Message ----
> From: Gabriele Kahlout <ga...@mysimpatico.com>
> To: Derby Discussion <de...@db.apache.org>
> Sent: Sat, 10 April, 2010 10:23:12
> Subject: feature request: DATE(CURRENT_DATE)
>
> Hello,
>
> I'm trying to retrieve the CURRENT_DATE from the DATE() function. Is
> there how to do it, without of course specifying it?
>
> --
> Regards,
> K. Gabriele
>
> --- unchanged since 25/1/10 ---
> P.S. Unless a notification (LON), please reply either with an answer
> OR with " ACK" appended to this subject within 48 hours. Otherwise, I
> might resend.
> In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
> this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
> ¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).
>
> Also note that correspondence may be received only from specified a
> priori senders, or if the subject of this email ends with a code, eg.
> -LICHT01X, then also from senders whose reply contains it.
> ∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
> In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).
>
>
>
>
>
>


-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer
OR with " ACK" appended to this subject within 48 hours. Otherwise, I
might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a
priori senders, or if the subject of this email ends with a code, eg.
-LICHT01X, then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).

Re: feature request: DATE(CURRENT_DATE)

Posted by Tiago Espinha <ti...@yahoo.co.uk>.
Hello Gabriele,

Based on the documentation at http://db.apache.org/derby/docs/10.5/ref/rrefsqlj34177.html it seems that CURRENT_DATE is itself a function.

So you can do:
SELECT * FROM Flightavailability where flight_date > CURRENT_DATE;

Hope it helps,
Tiago


----- Original Message ----
From: Gabriele Kahlout <ga...@mysimpatico.com>
To: Derby Discussion <de...@db.apache.org>
Sent: Sat, 10 April, 2010 10:23:12
Subject: feature request: DATE(CURRENT_DATE)

Hello,

I'm trying to retrieve the CURRENT_DATE from the DATE() function. Is
there how to do it, without of course specifying it?

-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer
OR with " ACK" appended to this subject within 48 hours. Otherwise, I
might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a
priori senders, or if the subject of this email ends with a code, eg.
-LICHT01X, then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).