You are here: Re: Populate table with stored proc « MsSQL Server « IT news, forums, messages
Re: Populate table with stored proc

Posted by Plamen Ratchev on 04/24/07 22:50

Just to clarify, you can still get the same results without normalizing the
DaysOff table... :)

SELECT E.emp_id,
C.date
FROM DaysOff AS E, CalendarDays AS C
WHERE C.date BETWEEN @start and @end
AND NOT EXISTS
(SELECT *
FROM DaysOff AS O
WHERE O.emp_id = E.emp_id
AND C.calendar_dow IN (O.dayoff_1, O.dayoff_2));

Plamen Ratchev
http://www.SQLStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация