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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 date manipulation

Author  Topic 

scottichrosaviakosmos
Yak Posting Veteran

66 Posts

Posted - 2010-10-17 : 03:01:03
declare @tbldate table(stdid int, sdate date, eddate date)

insert into @tbldate
values
(100, '20100102', '20100505'),
(101, '20100203', '20100302'
)

i want my result set as
check if day in date is 01 if not then make day as 01 and increment month my 1. i have solution but its in 2 temporary table but i want solution in single query.

scoo

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-17 : 04:24:25
please dont cross post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151680

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -