-- Works when i place the guid into the query
exec sp_executesql N'SELECT Id FROM tProduct WHERE cast(RelatedProducts as varchar(8000)) like ''%cffc83d0-094a-4f61-8728-18efe1509781%'' AND DateExpired is null',N'@ProductGuid nvarchar(36)',@ProductGuid=N'cffc83d0-094a-4f61-8728-18efe1509781'
-- Does not work as i want it to
exec sp_executesql N'SELECT Id FROM tProduct WHERE cast(RelatedProducts as varchar(8000)) like ''%@ProductGuid%'' AND DateExpired is null',N'@ProductGuid nvarchar(36)',@ProductGuid=N'cffc83d0-094a-4f61-8728-18efe1509781'
|