I have a DTS job for which I need to make it run in the morning and in the afternoon, create an excel spreadsheet and mail it to a customer.
I have my queries in place and now am creating my Dynamic Property for naming the file -- this is my code
However, when I click the refresh button it gives me an unexpected error.
When I run this in Query analyzer, it runs perfectly.
Any insight?
Thanks!
Margaret
I have my queries in place and now am creating my Dynamic Property for naming the file -- this is my code
Code:
select '\\Europe\Public\AR Department\Completions_' + cast(datepart(mm, getdate()) AS varchar(2))
+ cast(datepart(dd, getdate()) as Varchar(2)) +
cast(datepart(yyyy, getdate()) as Varchar(4)) + case when datepart(hh, getdate()) < 12 then '_AM' when datepart(hh, getdate()) > 12 then '_PM' end +'.xls'
However, when I click the refresh button it gives me an unexpected error.
When I run this in Query analyzer, it runs perfectly.
Any insight?
Thanks!
Margaret