Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Working on type 2 dimension in 2014 visual studio

$
0
0
Actually , for historical record I have to update End date as Updated Date where end date is Default date '2099-12-31'and for new record with same id , have to insert with Default date '2099-12-31'.But it is not updating default the end date when there is date value. But when I loaded with Null as Enddate it is updating. It is working for Null and not working for Dates. I am trying to figure out from one day , it is not helping me out. So please any one got a chance try to give some tips. Please refer below query for better understanding. [b]No Luck---[/b] UPDATE [dbo].[DimMember] SET [EndDate] = GETDATE() , UpdateDate = GETDATE() WHERE [MemberNumber] = 1041 AND [EndDate] ='2015-07-19 00:00:00.000'[b]Working for this querry[/b] UPDATE [dbo].[DimMember] SET [EndDate] = GETDATE() , UpdateDate = GETDATE() WHERE [MemberNumber] = 1041 AND [EndDate] IS NULL

Viewing all articles
Browse latest Browse all 3145

Trending Articles