Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Advanced SQL to update from insert
Message
De
25/01/2013 14:00:32
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01564084
Message ID:
01564112
Vues:
27
>
>;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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform