Subject Re: extract(month from tablename.sendate)
Author dirinler
--- In firebird-support@yahoogroups.com, "Anderson Farias"
<peixedragao@...> wrote:
>
> Hi,
>
> > Thanks Anderson but im sure i use fb 2.1.0(win32) and i dont think
> > its beta version.
> >and the error is
> >SQL error code=-104
> >token unknown - line 1,column 200
> >WEEK'.
>
>
> Sorry, should have asked you before, could you post here the actual
SQL
> you're trying?
>
>
> Regards,
> Anderson Farias
>

IBQuery2.Close;
IBQuery2.SQL.Clear;

IBQuery2.SQL.Add( 'select sum(sevkdetail.sevkadeti) as
top_sevki,extract(week from sevkdetail.sevktarihi)as sevk_ayi from
sevkdetail ');


IBQuery2.SQL.Add( 'where sevktarihi>='''+datetostr
(DateTimePicker1.date)+''' AND sevkdetail.sevktarihi<='''+datetostr
(DateTimePicker2.date)+''' ');

IBQuery2.SQL.add('GROUP BY extract(week from
sevkdetail.sevktarihi)' );


IBQuery2.open;