liorlankril
Programmer
I have a web part that contain SQL Query for serching users profile
string SQL_QUERY="SELECT " +
\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", "+
"\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\" "+
"FROM " +
"( TABLE Portal_Content..Scope() " + "UNION ALL TABLE Non_Portal_Content..Scope() ) " +
"WHERE " +
"(CONTAINS(\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", '\""+val+"*\"')" +
"OR CONTAINS(\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\", '\""+val+"*\"')) ";
This Query search user which his FirstName or LastName contain 'val' on the begining - Example if val="ko" it will find "Kobi Brayent" and "Jon Kobiak"
I want to chang the query to find any apperance of val in FirstName or LastName - Examplae if val="bi" or "ye" it will find "Kobi Brayent"
string SQL_QUERY="SELECT " +
\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", "+
"\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\" "+
"FROM " +
"( TABLE Portal_Content..Scope() " + "UNION ALL TABLE Non_Portal_Content..Scope() ) " +
"WHERE " +
"(CONTAINS(\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", '\""+val+"*\"')" +
"OR CONTAINS(\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\", '\""+val+"*\"')) ";
This Query search user which his FirstName or LastName contain 'val' on the begining - Example if val="ko" it will find "Kobi Brayent" and "Jon Kobiak"
I want to chang the query to find any apperance of val in FirstName or LastName - Examplae if val="bi" or "ye" it will find "Kobi Brayent"