Ver Mensaje Individual
  #3  
Antiguo 29-07-2015
Avatar de apicito
apicito apicito is offline
Miembro
 
Registrado: may 2003
Ubicación: Ourense
Posts: 341
Reputación: 22
apicito Va por buen camino
Gracias por la aportación.
He probado:
Código SQL [-]
select 
CODTIPODOC, CODIGODOC, LETRADOC, NOMBRE,  PARAPELLIDO1, APELLIDO1, PARAPELLIDO2, APELLIDO2, SEXO, HOJAPADRONAL, count(*)  
from PHABITANTES  Group By HOJAPADRONAL Having Count (*) = 1
y me da error de
Código:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause).
Parece como si el "group by" solo pudiese seleccionar el campo de agrupación.
Responder Con Cita