Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last record in each group
Message
De
30/11/2007 11:12:03
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01272276
Message ID:
01272420
Vues:
22
Here my code:

SELECT a.empresa,a.cedula,a.coddivision,a.codlocaliza, a.sueldod, Max (a.fpay_has) AS fpay_has
FROM roltransacc a, roltransacc b
WHERE a.empresa ='EMPA' and a.cedula ='1308348083'
AND a.cedula = b.cedula
AND b.empresa = a.empresa
GROUP BY a.empresa, a.cedula, a.coddivision, a.codlocaliza, a.sueldod, a.fpay_has
having max(a.fpay_has)


But the last code line "having max(a.fpay_has)" does not work. As fact, when I include this line, SQL return an error :

Line 7: Incorrect syntax near ')'

.............
Any idea ?

thanks
CB
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform