this is what i am trying to do36 questions have been answered with all answers going into one row. this results in 37 col's (autoID). each col has a set number. i am trying to do this within a store procedure. i added my comment below within the code under the question area. its a simple sp temp table, however i have 36 questions with 7 different options. ideas? CREATE PROCEDURE sp_select_self (@nomid nvarchar(50), @question int)ASCREATE TABLE #tempStrong_Agree( nomid nvarchar(50), total nvarchar(100),)INSERT INTO #tempStrong_agree (nomid, total)SELECT nomid, count(*) FROM Assessments where nomid=@nomid and assessor_relationship like '%Self%' and question1=6/**note the 'question' field name above in the select statement. each 'question' field name will be question1..question36. i need a way to use the @question interger passed to the SP to determine the col to select from**/select * from #tempStrong_agreeGO
is this doable? i cant use the @question to pass the select statement what colum we are on.