Sys calendar

Database

Sys calendar

I would like to know if there'd be any performance issue if i join with sys.calendar table twice in a query..? why is it so?

Could this be avoided? my reqt. is to find out all the days between two dates..
ie. if my input is 12/11/2009 and 17/11/2009

The output should be

12/11/2009
13/11/2009
14/11/2009
15/11/2009
16/11/2009
17/11/2009

1 REPLY
Senior Apprentice

Re: Sys calendar

Each join is additional work, so performance will be "slower".

But for your examaple there's no need to join twice?

select calendar_date from calendar where calendar_date between date '2009-11-12' and date '2009-11-17';

Dieter