Skip to main content

Notifications

Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Generic SQL Error – Retrive...

Generic SQL Error – RetriveMultiple with ConditionOperator.Contains in CRM

Nishant Rana Profile Picture Nishant Rana 55 Microsoft Employee

Hi,

Was getting Generic SQL Error while using ConditionOperator.Contains in the ConditionExpression. The requirement was to get all the incident records based on the title attribute value.

condExp.AttributeName = “title”;

condExp.Operator = ConditionOperator.Contains;

condExp.Values.Add(“test”);

The correct way to perform this kind of search is by using Like operator with %.

condExp.AttributeName = “title”;

condExp.Operator = ConditionOperator.Contains;

condExp.Values.Add(“%test%”);

http://social.microsoft.com/Forums/en-US/ede5932b-5ac9-4fc9-86d9-12ef5b2b305d/crm-2011-getting-generic-sql-error-when-performing-retrievemultiple-with?forum=crmdevelopment

Hope it helps.

 

 

 


Filed under: CRM, CRM 2011, CRM 2013, Microsoft Dynamics CRM Tagged: CRM, CRM 2011, CRM 2013, CRM 4.0

This was originally posted here.

Comments

*This post is locked for comments