Question : Data driven subscription with parameters

I have a report that uses a linked server to get the results.  I am trying to display yesterdays date and the total amount fields in the comment section of the email. I know how to set it up if I was just getting values but I don't know how to set up the subscription with the start and end date parameters.  

I just want to make sure I'm going about this in the correct mannner.
1:
2:
3:
declare @sql varchar(5000)
set @sql='select sum(CR_APP_AMT) from openquery(TEST, ''SELECT * from laf9.dpaymts where GL_DATE between '''''+ convert(varchar(10),@begindate,101) +''''' and '''''+ convert(varchar(10),@enddate,101) +''''''')'
exec(@sql)

Answer : Data driven subscription with parameters

User-defined types (UDTs) that were created in an instance of SQL Server have dependencies on common language runtime (CLR) assemblies. If you use the Transfer SQL Server Objects task to transfer UDTs, you must also configure the task to transfer dependent objects. To transfer dependent objects, set the IncludeDependentObjects  property to True.

here:
http://msdn.microsoft.com/en-us/library/ms142159.aspx

for FKs you don't need this option


Random Solutions  
 
programming4us programming4us