Wednesday, March 21, 2012

Incorrect Parameter in Desing Mode

WHERE (Cono = @.Company) AND (DATEPART(month, PaymentDate) = @.Month) AND (DATEPART(year, PaymentDate) = @.Year)

If I run the job in preview mode I enter the parameter data as requested and it runs correctly. When I go back to design mode and run the query using the ! (the parameter box pops up with the data I entered in preview mode) I get an error message - The Parameter is incorrect.

I've tried setting the parameters to every combination of string/interger I can think of.

What is happening here?

Try to eliminate parameters one by one (replace with a literal value), so you'll know which parameter causes the error message.|||It has to do with the cono (Company) parameter. Cono is defined as integer. I get the message no matter if I set the parameter value to string or integer.

No comments:

Post a Comment