DEAR "PIEBALDconsult" said :
i need enclose my execution
and i just observance the encapsulation
with batch
"GO"
Exactly i forgot GO
:)
thanks
"PIEBALDconsult"
ALTER PROC GetCombinationAndCombinationImageByProductIdAndImageId
@ProductId INT,
@ImageId INT
AS
BEGIN
SELECT CI.ImageId , CI.CombinationId
FROM
Production.Product P
INNER JOIN
Production.Combination C
ON
P.Id = C.Product_Id
AND
P.Id = @ProductId
INNER JOIN
Production.Combination_Image CI
ON
C.Id = CI.CombinationId
INNER JOIN
Production.[Image] I
ON
CI.ImageId = I.Id
AND
I.Id = @ImageId
END
GO
EXEC GetCombinationAndCombinationImageByProductIdAndImageId @ProductId = 11 , @ImageId=17
GO