HLRosenberger
asked on
Stored Proc Question
I'm building a WHERE clause that uses the IN keyword like: IN (100, 104, -45). where the values are numeric.
I've declared a variable, like: DECLARE @HOMEIDS varchar(50);
Then I set it like: SET @HOMEIDS = '-100, -101';
I want in effect, IN (@HOMEIDS), but doing this get me an error: Error converting data type varchar to bigint.
How can I fix this?
I've declared a variable, like: DECLARE @HOMEIDS varchar(50);
Then I set it like: SET @HOMEIDS = '-100, -101';
I want in effect, IN (@HOMEIDS), but doing this get me an error: Error converting data type varchar to bigint.
How can I fix this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER