Is that like the type of sex you want....is this mail order?
Anyway, you need to take out the GO...that's a scope terminator
And are you sure you want a GLOBAL Temp table instead of a local one?
CREATE PROCEDURE [dbo].[Test2]
CREATE TABLE ##OPTIONSEX (
, TOT_OPTIONS_EXCHANGED FLOAT NULL
, TOT_OPTIONS_EXCHANGED = SUM(A.UNITS)
FROM TBLEXERCISEOPTIONS A
INNER JOIN TBLCOMPONENT B
ON B.COMPONENTID = A.COMPONENTID
GROUP BY B.COMPONENT
DROP TABLE ##OPTIONSEX