Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jeskit@hotmail.co.uk
Starting Member
20 Posts |
Posted - 2007-12-06 : 11:50:34
|
| hii'm doing a hoilday database and i was wondering does anyone know how to create a query which shows the hoilday and site details that commence in the calender month that follows the current month. thanks jessica |
|
|
Ifor
Aged Yak Warrior
700 Posts |
Posted - 2007-12-06 : 12:24:16
|
| [code]DECLARE @NextMonthStart datetimeSET @NextMonthStart = CONVERT(char(6), DATEADD(m, 1, GETDATE()), 112) + '01'[/code]SELECT *FROM YourTableWHERE HolidayStartDate >= @NextMonthStart AND HolidayStartDate < DATEADD(m, 1, @NextMonthStart)[/code] |
 |
|
|
Jeskit@hotmail.co.uk
Starting Member
20 Posts |
Posted - 2007-12-09 : 09:40:40
|
hithank you i'll try thatthanksjessica |
 |
|
|
|
|
|