Subject | Re: extract(month from tablename.sendate) |
---|---|
Author | dirinler |
Post date | 2008-10-22T12:25:34Z |
--- In firebird-support@yahoogroups.com, "Anderson Farias"
<peixedragao@...> wrote:
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;
<peixedragao@...> wrote:
>SQL
> 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
> you're trying?IBQuery2.Close;
>
>
> Regards,
> Anderson Farias
>
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;