[SOLVED] URGENT-URGENT, after updating many applications do not work

[TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, bgcolor: #FF0000, align: left”]Errore[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, bgcolor: #FFDDDD, align: center”]Errore durante l’accesso alla banca dati:
SQLState: 42000 Error Code: 1033 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
select count(*) from (SELECT m.Codice,m.DataMov,m.CodPercEff, m.CodCliente,m.CodSito,m.CodMagazzinoArrivo,m.CodProdotto,m.Quantita,m.ValoreTotale,m.Aliquota, ‘m’ AS da,m.TImpo,m.TIva FROM Movim m LEFT JOIN Clienti c ON c.Codice=m.CodCliente LEFT JOIN SitCli sc ON sc.Codice=m.CodSito WHERE m.flgFatturato=1 AND m.Quantita>0 AND m.CodPercEff NOT IN( SELECT DISTINCT pgt.CodPercEff FROM PeGioT pgt WHERE pgt.FlgConsuntivo=0) AND m.CodCliente=370 ORDER BY m.Codice DESC ) nm_sel_esp[/TD]
[/TR]
[/TABLE]

select count(*) from (SELECT m.Codice,m.DataMov,m.CodPercEff, m.CodCliente,m.CodSito,m.CodMagazzinoArrivo,m.CodP rodotto,m.Quantita,m.ValoreTotale,m.Aliquota, ‘m’ AS da,m.TImpo,m.TIva FROM Movim m LEFT JOIN Clienti c ON c.Codice=m.CodCliente LEFT JOIN SitCli sc ON sc.Codice=m.CodSito WHERE m.flgFatturato=1 AND m.Quantita>0 AND m.CodPercEff NOT IN( SELECT DISTINCT pgt.CodPercEff FROM PeGioT pgt WHERE pgt.FlgConsuntivo=0) AND m.CodCliente=370 ORDER BY m.Codice DESC ) nm_sel_esp

SELECT DISTINCT pgt.CodPercEff FROM PeGioT pgt WHERE pgt.FlgConsuntivo=0) AND m.CodCliente=370 ORDER BY m.Codice DESC is bad. This is not a bug it is as it should be. Remove the ORDER BY piece from the code.

Topic Moved

solved with version 8.1.035