First of all, thanks for your help!
I've to say that I'm new the teradata and the whole database thing!
I do not completly understand this function.
Sure I know what mod is. But why subtract 0001-01-07 from my column and then mod 7?
For example today. That makes no sense to me :(
2013-06-05 - Date '0001-01-07' --> !?
and shame to me, how can i substract 20*7 days in this case?
my query:
select
i.Abschluss_Erledigt_TS
from
tabelle i
where
CAST(i.Abschluss_Erledigt_TS AS DATE) <= current_date
and
CAST(i.Abschluss_Erledigt_TS AS DATE) >= (CAST(i.Abschluss_Erledigt_TS AS DATE) - ((CAST(i.Abschluss_Erledigt_TS AS DATE) - DATE '0001-01-07') MOD 7)-20*7)
order by 1 desc
First of all, thanks for your help!
I've to say that I'm new the teradata and the whole database thing!
I do not completly understand this function.
Sure I know what mod is. But why subtract 0001-01-07 from my column and then mod 7?
For example today. That makes no sense to me :(
2013-06-05 - Date '0001-01-07' --> !?
and shame to me, how can i substract 20*7 days in this case?
my query:
select
i.Abschluss_Erledigt_TS
from
tabelle i
where
CAST(i.Abschluss_Erledigt_TS AS DATE) <= current_date
and
CAST(i.Abschluss_Erledigt_TS AS DATE) >= (CAST(i.Abschluss_Erledigt_TS AS DATE) - ((CAST(i.Abschluss_Erledigt_TS AS DATE) - DATE '0001-01-07') MOD 7)-20*7)
order by 1 desc
Thanks again for your help!