CREATE PROC DoStuff
@Parameter int
AS
SET NOCOUNT ON;
SELECT
*
FROM
Categoria C
JOIN
Anuncio A ON C.idCategoria = A.idCategoria
JOIN
Imagenes I ON A.idImagen = I.idImagen
WHERE
C.idCategoria = @Parameter;
GO
gbn
2009-08-28 14:28:15