I need help with a query. I would like to add in a parameter that allow user to select a field dynamically.
Here's the query.
DECLARE @ID VARCHAR(2)
DECLARE @ITEM_ID VARCHAR(30)
SET @ID = '1'
SET @ITEM_ID = '09901'
SELECT ITEM_ID, DESCRIPTION, USER_+@USER+
WHERE ITEM_ID = @ITEM_ID
I would like for user to be able o toggle from 1 to 10 with the user field.