Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advanced SQL to update from insert
Message
From
25/01/2013 14:00:32
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01564084
Message ID:
01564112
Views:
28
>
>;with cte as (select cast(Version.[Date] as Date) as [DateNoTime], *, 
>COUNT(*) OVER (partition by cast(Version.[Date] as Date)) as cntVersionsPerDay, 
>row_number() over (partition by cast(Version.[Date] as Date) ORDER BY Version.[Date] DESC) as Rn
> from dbo.Version)
>
>insert into VersionProduction (AddUser, AddDate, ....)
>
>select ....
>
>from cte where Rn = 1
But, what is updating Version.NoVersionProduction in there?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform