Subject | Re: [firebird-support] Context variables |
---|---|
Author | Ivan Prenosil |
Post date | 2005-03-14T11:37:45Z |
> Am I correct in thinking that these are equivalent line of code (given bothNo.
> dt1 & dt2 are defined as date (dialect1) and timestamp (dialect3):
>
> dt1 = CURRENT_TIMESTAMP;
>
> dt2 = CAST(CAST ('NOW' AS VARCHAR(11)) as DATE);
* First one will return timestamp (i.e. date+time),
the second one just date.
* First one is evaluated only once for each statement,
the second one everytime the expression is evaluated.
* 'NOW' is CHAR(3) string, there is no reason to cast it to VARCHAR(11).
This is enough:
dt2 = CAST('NOW' as DATE);
Ivan
http://www.volny.cz/iprenosil/interbase/