Can anyone help me out.
I want to select the "productid" for all products from a table called "products" that both "user1" and "user2" have purchased
I am using
ALTER PROCEDURE test
(@user1 as int, @user2 as int)
AS
Select productid from (Select productId
From products
Where productid=@user1)
WHERE productid=@user2
I am getting an incorrect syntax around the word "Where" message.
Can anyone tell me the correct syntax for this
Many thanks
Martin