Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update from CROSS APPLY
Message
From
08/08/2013 14:42:58
 
 
To
08/08/2013 11:32:42
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01580047
Message ID:
01580073
Views:
42
>
>UPDATE Invoice SET Status=DispatchDetail.Status
>FROM Invoice
> INNER JOIN (SELECT InvoiceDetail.AddDate,*
>                    FROM Invoice
>             CROSS APPLY (SELECT TOP 1 InvoiceDetail.Numero,InvoiceDetail.AddDate
>                                 FROM InvoiceDetail
>                          WHERE InvoiceDetail.NoInvoice=Invoice.Numero
>                          ORDER BY InvoiceDetail.Numero DESC) InvoiceDetail
>             WHERE Invoice.Status='1899-12-30 00:00:00.000') InvDet
>      on InvDet.NoInvoice=Invoice.Numero
>
>?

Thank you, this works perfectly.
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
Reply
Map
View

Click here to load this message in the networking platform