General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2000
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only