Click here to Skip to main content
14,695,272 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a query which will give the duplicate of the number, but when i entered Upper case and lower case number it was not taking as duplicate.

Number: TEST1
Number: test1

my linq query:

var Duplicatenumber = from a in Listnum
                                  join b in serialmaster on a.ID equals b.list_Id
                                  select new
                                  {
                                      Line = a.LineNumber,
                                      SAPLine = a.SAPLine,
                                      Code= a.Code,
                                      Description = a.Description,
                                      Number = b.number,
                                      NumberID = b.NumberID,
                                      CodeID = a.ID

                                  };
        // Code Change for eliminate the empty values
            var ExactDuplicate = from a in Duplicatenumber 
                                 where !string.IsNullOrWhiteSpace(a.Number)
                                 group a by new { a.Number } into g
                                 where g.Count() > 1
                                 select new
                                 {
                                     g.Key.Number

                                 };
Posted
Updated 28-May-12 0:03am
v2

   
Comments
Maciej Los 28-May-12 5:39am
   
Good references, my 5!
Prasad_Kulkarni 28-May-12 5:52am
   
Thank you, Isomac!
see this link you may get some idea

http://forums.asp.net/t/1346775.aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900