I have a parameter in inside a sub query of a SQL command data source. I am trying to put this in a variable of string type since SQL command cannot take parameters in a sub query. Below is my SQL and I cannot parse due to some error. Can someone please help. Thanks in advance.
"select [SpecificationAttributeID]
,[SpecificationID]
,[StatusID]
,[AttributeID]
,[Version]
,[AddedDescription]
from Lewcmesdb1.webspecdc.dbo.SpecificationAttributes sa with (nolock)
where exists (select '1'
from Lewcmesdb1.webspecdc.dbo.Samples s with (nolock)
where s.SpecificationAttributeID = sa.SpecificationAttributeID
and s.SavedSampleTime >= dateadd(dd,'" +@[User::Day]+"'"",getdate()))" 

