I need help with that error this is my code
CREATE OR REPLACE VIEW emplpersuc
AS SELECT SUCURSAL.NOMBRE, COUNT(SUCURSAL.NOMBRE) FROM VENTA
JOIN SUCURSAL ON SUCURSAL_CODIGO_SUCURSAL=CODIGO_SUCURSAL
GROUP BY SUCURSAL.NOMBRE
ORDER BY COUNT(SUCURSAL.NOMBRE) DESC;
I tried everything in my knowledge, i´m desperate
As the error states, you need to make sure your columns all have valid identifiers (and although
COUNT(NOMBRE)is a valid expression, it is not a valid identifier to name the column in the view).You can either name it in the view's signature:
or with a column alias in the query: