Problem with SQL Server script? Help

-1

I have the following sql server code with the tables site, neighborhood, location and province. The scrip throws some syntax error? What is the result that throws? thank you for hours I'm struggling with this

SELECT S.razonSocial, count(*)
FROM Sitio S, Barrio B, Localidad L, Provincia P
WHERE S.barrio = B.idBarrio
     AND B.idLocalidad = L.idLocalidad
     AND L.idProvincia = P.idProvincia
     AND P.nombre = ‘Cordoba’
GROUP BY S.cuil
HAVING count(*) > 5
    
asked by Manuel 09.06.2018 в 07:46
source

1 answer

0

the problem that you have seems to me to be in the quotes, so apparently it works:

SELECT S.razonSocial, count(*)
FROM Sitio S, Barrio B, Localidad L, Provincia P
WHERE S.barrio = B.idBarrio
     AND B.idLocalidad = L.idLocalidad
     AND L.idProvincia = P.idProvincia
     AND P.nombre = 'Cordoba'
GROUP BY S.cuil
HAVING count(*) > 5
    
answered by 11.06.2018 в 14:15