Subject Re: [firebird-support] date function
Author Martijn Tonies
> > > SELECT CURRENT_DATE FROM RDB$DATABASE
> >
> >But, this doesn't. "Field name missing" error arise.
>
> That is not a Firebird engine error, but an error from your program. In
> SQL, if you need a field name for a derived field, us the AS clause:
>
> SELECT CURRENT_DATE FROM RDB$DATABASE AS CurrentDate
>
> NB you can optionally omit the keyword "AS" and just provide the
fieldname.

Make this:

select current_date as mydate
from rdb$database

Any field-alias should be right after the field, not after the
complete statement.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com