How can I compare columns in a dataset for equal and not equal values?

hi all, i have a dataset that contains 4 columns, employee key, employee name, manager key, manager name. i need to be able to list a set of rows of discrepancies where emp key = mgr key and names are different, or if emp name = mgr name, list the keys that are different.

so if employee key = 123 and employee name for key 123 is kelly, and manager key = 123 and manager name for mgr key 123 is matt, then i need to list that as a row, since the names don't match the equal keys.

i have a loop (below) going through the dataset looking for the discrepancies, but it's proving too slow on larger datasets where there is 50,000 + rows. What I need is help with possibly setting up a relationship or filtered view to the dataset to accomplish the same thing. Performance is really what i'm looking for here.

You might have better luck offloading that to your DB server. MS SQL? You could create a view or stored proc that would take care of finding your discrepancies, and then the ASP only has to list what comes out of that. Is this a viable option? If you can give a little info on how your DB is set up I can give you the SQL to do it.

not an option, the dataset is generated from the user choosing a file with several columns in it. they then select which columns they want to be the emp key/name, and mgr key/name. so the columns are coming from 4 drop downs on a web page listing all the available columns in the file.

so the user is looking for file discrepancies between values they choose, i was trying to make the question easier by not going there.

the dataview provided has the same problem as my filter string posted right before your's.

the rows in the dataset are like this:

empkey empname mgrkey mgrname

so what we're both doing is going through the dataset one row at a time looking for equal keys, different names.

if data was
123 matt 234 kelly
234 linda 123 matt

you won't find any discrepancies because 123 is not = to 234, and 234 is not = 123, the check is going through the dataset one row at a time.

i need to go through the data set so the 123 for the emp key is compared to the 123 of the mgr key. so instead of comparing each individual row, i need to take the emp key 123 for matt, and look for the 123 mgr key (next line), then mark THAT as a discrepancy because the 234 name (linda) is not the same as the previous 234 (kelly).

In this Article, I will provide a few tips in problem and solution manner.
Opening an ASPX page in Visual studio 2003 is very slow.
To make it fast, please do follow below steps:
Open the Solution/Project.
Right click the ASPX file to b…

Problem
Hi all,
While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.
If your ASP.NET page …

Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers.
Hopes this gives you ideas on visualizing your data in new ways ~
Create a calculated field in a query:
…