Visualizzazione dei risultati da 1 a 10 su 13

Hybrid View

  1. #1
    ok, allora metti datepart(mm,CONVERT(date,DATF,105) anche nella group by (anche se ti converrebbe darci un taglio netto e trasformare DATF in DateTime già sul db )

  2. #2
    Ciao,
    non ho creato io la tabella e non posso toccarla..
    Ho ripristinato il Group by e l'ultima versione della query è questa.
    codice:
     
    select  datepart(mm,CONVERT(date,DATF,105)) as mese,  datename(month,CONVERT(date,DATF,105)) as miadata,SUM(CAST(NETTO AS INT))  AS quanti from MOVIMENTI where  (CAUS IN ('01', '02','65')) AND (MOVIMENTI.SMAL = '900000.0002')group by  DATEname (month,convert(date,datf,105))  order by datepart(mm,CONVERT(date,DATF,105))
    Questo è l'errore che ottengo
    Column 'MOVIMENTI.DATF' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

    Grazie cmq

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.