c# - LINQ querying same table -


I am trying to find all the rows where the invoice numbers are the same, but there are different cities.

When I run into a code, 'System.collections' Generic I can not convert INNMerebal actually to 'Bull' error. From

  to DataRowView i dv (where from DataRowView to DV in i.Row ["InvoiceNo"] == s.Row ["InvoiceNo"] and i.Row ["City "]! = S.Row [" City "] Select s) Selection i;  

So I only want a set of data like {123, Seattle, ...}, {123, Seattle, ...}, {123, Portland, ...} I'm one (in this case) to return {123, Portland, ...}.

I'm not sure what I'm doing ...

< Code> Where needs to be followed indicates whether the item should be included or not. You have provided a sequence of rows, this where does not tell whether an item should be included in it or not.

You are clearly trying to connect to yourself in this table, on which you apply the filter to join , and then the associated result:

  var query = In the first DV connect to another in DV. Line ["invoice no"] is equal to second. ["Invoice Nino"] Where the first. Road ["City"]! = Second. Rao ["city"] first choose;  

Comments

Popular posts from this blog

mysql - How to enter php data into a html multiple select box -

java - Can't add JTree to JPanel of a JInternalFrame -

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -