Funciones
Publicado por jo (2 intervenciones) el 05/05/2005 18:50:03
CREATE FUNCTION dbo.ventes
()
RETURN MONEY
AS
BEGIN
RETURN(SELECT SUM(Preu_total)
FROM Venta_Client)
END
Bien creo que se entiende la fubncion devolvera el total de las ventas realizadas ,bueno eso devberia hacer pq me sale este mensaje
Server: Msg 156, Level 15, State 1, Procedure ventes, Line 3
Sintaxis incorrecta cerca de la palabra clave 'RETURN'.
Server: Msg 178, Level 15, State 1, Procedure ventes, Line 8
En este contexto no se puede utilizar la instrucción RETURN con un valor de retorno.
alguien me puede ayudar ,gracias
()
RETURN MONEY
AS
BEGIN
RETURN(SELECT SUM(Preu_total)
FROM Venta_Client)
END
Bien creo que se entiende la fubncion devolvera el total de las ventas realizadas ,bueno eso devberia hacer pq me sale este mensaje
Server: Msg 156, Level 15, State 1, Procedure ventes, Line 3
Sintaxis incorrecta cerca de la palabra clave 'RETURN'.
Server: Msg 178, Level 15, State 1, Procedure ventes, Line 8
En este contexto no se puede utilizar la instrucción RETURN con un valor de retorno.
alguien me puede ayudar ,gracias
Valora esta pregunta


0