>Thanks! I will most likely go with the reference table(s) option, but I
>will test both.
One alternative that I don't think have been mentioned, Cornie, is EXECUTE
BLOCK, which is simpler than a recursive CTE without requiring any extra table:
execute block returns (yearno integer, dayno integ
>>> I have query which extract the sales per day from a table
>
> >>>
> >>> Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT)
> AS DAYNO, SUM(DUE) from CLIENT_INVOICES group by YEARNO, WEEKNO.
> >>>
> >>> It works 100%, but only returns the dates with sales, I need it to
> also in
Em 24/10/2012 20:37, Doug Chamberlin escreveu:
> On 10/24/12 6:25 PM, Alexandre Benson Smith wrote:
>> Em 24/10/2012 20:21, Doug Chamberlin escreveu:
>>> On 10/24/12 5:54 PM, cornievs wrote:
I have query which extract the sales per day from a table
Select EXTRACT(YEAR from DT) as YEA
On 10/24/12 6:25 PM, Alexandre Benson Smith wrote:
> Em 24/10/2012 20:21, Doug Chamberlin escreveu:
>> On 10/24/12 5:54 PM, cornievs wrote:
>>> I have query which extract the sales per day from a table
>>>
>>> Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS DAYNO,
>>> SUM(DUE)
Em 24/10/2012 20:21, Doug Chamberlin escreveu:
> On 10/24/12 5:54 PM, cornievs wrote:
>> I have query which extract the sales per day from a table
>>
>> Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS DAYNO,
>> SUM(DUE) from CLIENT_INVOICES group by YEARNO, WEEKNO.
>>
>> It wor
On 10/24/12 5:54 PM, cornievs wrote:
> I have query which extract the sales per day from a table
>
> Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS DAYNO,
> SUM(DUE) from CLIENT_INVOICES group by YEARNO, WEEKNO.
>
> It works 100%, but only returns the dates with sales, I need
But this won't return rows for dates where there is no record in the source
table.
On Wed, Oct 24, 2012 at 6:02 PM, Leyne, Sean wrote:
> **
>
>
>
> > I have query which extract the sales per day from a table
> >
> > Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS
> > DAYNO, SU
try something like this:
with recursive
Datas (Data) as
(select
Cast('2009-01-01' as Date)
From
rdb$database
union all
Select
Data + 1
From
Datas
Where
Data + 1 <= Cast('2009-01-31' as Date))
select
> I have query which extract the sales per day from a table
>
> Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS
> DAYNO, SUM(DUE) from CLIENT_INVOICES group by YEARNO, WEEKNO.
>
> It works 100%, but only returns the dates with sales, I need it to also
> include
> the dates w
Hi All
I have query which extract the sales per day from a table
Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT) AS DAYNO,
SUM(DUE) from CLIENT_INVOICES group by YEARNO, WEEKNO.
It works 100%, but only returns the dates with sales, I need it to also include
the dates with zero
10 matches
Mail list logo