+2  A: 
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
-1 Doesn't retrieve any of the imagen details that he wants
LorenVS
It does now... It showed how to use a parameter though which is arguably what OP wanted...
gbn
I think your solution will work but I get an error that Anuncio is an invalid object name. I don't get that error with Categoria, why would this happen on Anuncio? Check http://bit.ly/3Dfjlu for the problem. Thanks for the help. :)
Sergio Tapia
+1  A: 

Try the following:

DECLARE @CategoriaID INT

SET @CategoriaID = 1

SELECT

a.idAnuncio,
a.titulo,
a.precio,
a.descripcion,
c.descripcion,
i.imagen

FROM

dbo.Anuncio a
INNER JOIN dbo.Categoria c
 ON a.idCategoria = c.idCategoria
INNER JOIN  dbo.Imagenes i
 ON a.idImagen = i.idImagen

WHERE

a.idCategoria = @CategoriaID

It's a query but you should be able to turn it into an SP easy enough. There might be a couple of spelling mistakes but it should get you started.

TLiebe