Click here to Skip to main content
15,891,253 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:

CSS
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 27-May-12 23:03pm
v2

 
Share this answer
 
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[^]
 
Share this answer
 

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