• You are explicity setting the value for @ss as ProductID

    Try something like the following

    Set @ss = (SELECT ProductID FROM SomeTable)

    Note that you may have to set a top 1 or where clause to ensure only 1 result is returned.