I'm trying to pass a comma separated list of GUIDs to a stored procedure but keep getting the following error
My stored procedure looks like thisSyntax error converting from a character string to uniqueidentifier.
The list of GUIDS is the @ManuID parameter.Code:CREATE PROCEDURE stp_GetProductNames @ManuID varchar(5000) AS SELECT DISTINCT A.ProductName FROM Products As A INNER JOIN Manfacuturers As B On (A.ManufacturerID = B.ManufacturerID) WHERE A.ManufacturerID IN (@ManuID) ORDER BY A.ProductName
The GUIDS just look like this ('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
Anyone know how to get around this error?




Reply With Quote