Error: Must define the scalar variable

Smart Query Spec has been created and when there are a lot of variables or if the variable names are too long, the smart query will fail within CRM when ran saying that you must define the scalar Variable
There is a limit of how big the stored procedure can be.   To get around this the client has shorten the names of all their variables as far as they can to just have the smart query run.  
Sample Spec.xml

Steps to Duplicate

1) Load spec that is attached
2) Try to run the smart query
3) Error is received saying you must define scarlar Variable


If you run the same stored procedure in SQL, it completes fine.  In CRM there seems to be some type of character length that cuts off the stored procedure from running completely.  

Environment

 Blackbaud CRM
 4.0

Was this article helpful?


Thanks for your feedback! Did this solve your issue?

Comments (optional):


Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):


Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.