I'm having trouble passing parameters to a stored procedure in mssql.

How do I pass a the string "1,2,3" so that it can be convert into the
tinyint. Needless to sa DivisionID is a tinyint.

This is the sp

-------------------------------------------------

CREATE PROCEDURE spTest
(
@arg_DivID CHAR(255)
)

AS

SELECT     TOP 100 PERCENT EmpID, LastName, FirstName, MaxDate, DivisionID,
DivisionAbrv, OfficeID, OfficeAbrv, ProjectID, ProjectAbrv
FROM         dbo.Lvl2ReqEmpInfo
WHERE     (DivisionID IN (@arg_DivID)) AND (OfficeID IN (1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14)) AND (ProjectID IN (0, 1, 2))
ORDER BY DivisionAbrv, OfficeAbrv, ProjectAbrv, LastName, FirstName
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to