Einzelnen Beitrag anzeigen

Benutzerbild von Union
Union

Registriert seit: 18. Mär 2004
Ort: Luxembourg
3.487 Beiträge
 
Delphi 7 Enterprise
 
#6

AW: Alle Tage zwischen Zeiträumen eines Jahres als SQL Ergebnis?

  Alt 29. Jul 2013, 14:00
So wie ich es verstanden habe ist dort nur das Anfangs- und Enddatum jedes Urlaubs gespeichert. Dann sollte es in etwa so gehen (für MySQL sind bestimmt noch Anpassungen nötig):
Code:
declare @dVon date;
declare @dBis date;

try
   create table #temp (Urlaubstag date);
catch all
end try;  

@dVon = '2013-07-01';
@dBis = '2013-07-31';

while @dVon <= @dBis do
   insert into #temp values (@dVon);
   @dVon = @dVon+1;   
end while;
select * from #temp;
 
select urlaubstag from #temp;
Ibi fas ubi proxima merces
sudo /Developer/Library/uninstall-devtools --mode=all
  Mit Zitat antworten Zitat