i use a procedure to search the table issues in my database for issues that have a certain string in the array searchParts occuring in one of their fields.<BR><BR>for every string that&#039;s part of searchParts i get the right issues, so far, this works.<BR>but when you take 2 strings, some issues are displayed (through a datagrid) twice.<BR><BR>what i would like to know is if there&#039;s a way to merge the datasets each time so only one remains that has all the issues (but each issue only once) that match all the criteria (AND function, or if that&#039;s impossible, some of the criteria, that would be an OR...).<BR><BR>basically, an issue can only occur once...<BR><BR>public DataSet SearchIssues(string[] searchParts)<BR> {<BR> // Create Instance of Connection and Command Object<BR> SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);<BR> SqlDataAdapter myCommand = new SqlDataAdapter("SearchIssues", myConnection);<BR><BR> myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;<BR> DataSet myDataSet = new DataSet();<BR> // add parameters to SPROC<BR> <BR> foreach (string searchPart in searchParts)<BR> {<BR> SqlParameter parameterSearchPart = new SqlParameter("@searchPart", SqlDbType.NVarChar, 20);<BR> parameterSearchPart.Value = searchPart;<BR> myCommand.SelectCommand.Parameters.Add(parameterSe archPart);<BR> <BR> // Execute the command <BR> myCommand.Fill(myDataSet, "Issues");<BR><BR> // remove the parameter to add a new one the next foreach is performed<BR> myCommand.SelectCommand.Parameters.Remove(paramete rSearchPart);<BR> }<BR><BR> // Return the datareader result<BR> return myDataSet;<BR> }