Click here to Skip to main content
14,326,311 members
   

C#

 
AnswerRe: to Pin
BillWoodruff28-Jun-19 15:16
mveBillWoodruff28-Jun-19 15:16 
AnswerRe: to Pin
Dave Kreskowiak28-Jun-19 17:30
mveDave Kreskowiak28-Jun-19 17:30 
AnswerRe: to Pin
OriginalGriff28-Jun-19 19:14
protectorOriginalGriff28-Jun-19 19:14 
GeneralRe: to Pin
Member 1451570728-Jun-19 21:56
memberMember 1451570728-Jun-19 21:56 
GeneralRe: to Pin
OriginalGriff28-Jun-19 22:09
protectorOriginalGriff28-Jun-19 22:09 
RantRe: to Pin
Eddy Vluggen29-Jun-19 1:04
mveEddy Vluggen29-Jun-19 1:04 
AnswerRe: to Pin
Gerry Schmitz29-Jun-19 2:36
mveGerry Schmitz29-Jun-19 2:36 
QuestionLINQ : Unmatched data is coming for inner join Pin
Mou_kol28-Jun-19 9:39
memberMou_kol28-Jun-19 9:39 
I am joining two list List.

i am joining 4 fields based on section,xfundcode,period & broker ** **cfList & QCViewAllBrokerList1 they are two List type.

Records exist in cfList for the section -> CONSENSUS MODEL, xfundcode -> RD_001, period -> 2018 FY & broker -> BW

but there is no records exist in this list QCViewAllBrokerList1 for the section -> CONSENSUS MODEL, xfundcode -> RD_001, period -> 2018 FY & broker -> BW.

so when i am doing inner join then match not found because same data does not exist in two list. as a result there no records should be stored in result variable called QCViewAllHistValue1 for the section CONSENSUS MODEL, xfundcode RD_001, period 2018 FY & broker BW.

but the problem is records exist in the list of QCViewAllHistValue1 for the section CONSENSUS MODEL, xfundcode RD_001, period 2018 FY & broker BW after inner join done.

How it is possible ? how data is storing in final result set called QCViewAllHistValue1 for the section -> CONSENSUS MODEL, xfundcode -> RD_001, period -> 2018 FY & broker -> BW

This is causing problem in my case.
var QCViewAllHistValue1 = (from frmlst in cfList
   join viewalllst in QCViewAllBrokerList1
   on new
   {
       val = String.IsNullOrEmpty(frmlst.Section) ? "" : frmlst.Section.Trim().ToUpper(),
       val1 = String.IsNullOrEmpty(frmlst.xFundCode) ? "" : frmlst.xFundCode.Trim().ToUpper(),
       val2 = String.IsNullOrEmpty(frmlst.Period) ? "" : frmlst.Period.Replace("A", "").Replace("E", "").Trim().ToUpper(),
       val3 = String.IsNullOrEmpty(frmlst.Broker) ? "" : frmlst.Broker.Trim().ToUpper()
   }
   equals new
   {
       val = String.IsNullOrEmpty(viewalllst.ViewAllSection) ? "" : viewalllst.ViewAllSection.Trim().ToUpper(),
       val1 = String.IsNullOrEmpty(viewalllst.xFundCode) ? "" : viewalllst.xFundCode.Trim().ToUpper(),
       val2 = String.IsNullOrEmpty(viewalllst.ViewAllPeriod) ? "" : viewalllst.ViewAllPeriod.Replace("A", "").Replace("E", "").Trim().ToUpper(),
       val3 = String.IsNullOrEmpty(viewalllst.ViewAllBroker) ? "" : viewalllst.ViewAllBroker.Trim().ToUpper()
   }

   select new QCHelper()
   {
       Value = viewalllst == null ? string.Empty : (viewalllst.Value == null ? string.Empty : viewalllst.Value),
   }).ToList<QCHelper>();


Please guide me where i am making the mistake in my above linq query. thanks
AnswerRe: LINQ : Unmatched data is coming for inner join Pin
Eddy Vluggen28-Jun-19 13:44
mveEddy Vluggen28-Jun-19 13:44 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol1-Jul-19 5:04
memberMou_kol1-Jul-19 5:04 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Eddy Vluggen1-Jul-19 5:08
mveEddy Vluggen1-Jul-19 5:08 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol1-Jul-19 9:35
memberMou_kol1-Jul-19 9:35 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Eddy Vluggen1-Jul-19 11:45
mveEddy Vluggen1-Jul-19 11:45 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol5-Jul-19 10:05
memberMou_kol5-Jul-19 10:05 
AnswerRe: LINQ : Unmatched data is coming for inner join Pin
Richard Deeming1-Jul-19 10:14
mveRichard Deeming1-Jul-19 10:14 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol5-Jul-19 10:05
memberMou_kol5-Jul-19 10:05 
Questionc# Pin
Member 1312071627-Jun-19 22:49
memberMember 1312071627-Jun-19 22:49 
AnswerRe: c# Pin
OriginalGriff27-Jun-19 23:30
protectorOriginalGriff27-Jun-19 23:30 
GeneralRe: c# Pin
Eddy Vluggen28-Jun-19 2:03
mveEddy Vluggen28-Jun-19 2:03 
GeneralRe: c# Pin
OriginalGriff28-Jun-19 2:23
protectorOriginalGriff28-Jun-19 2:23 
GeneralRe: c# Pin
Eddy Vluggen28-Jun-19 2:39
mveEddy Vluggen28-Jun-19 2:39 
AnswerRe: c# Pin
Gerry Schmitz28-Jun-19 6:51
mveGerry Schmitz28-Jun-19 6:51 
QuestionBase toString not printing to console Pin
Member 1451443227-Jun-19 5:42
memberMember 1451443227-Jun-19 5:42 
AnswerRe: Base toString not printing to console Pin
Dave Kreskowiak27-Jun-19 5:59
mveDave Kreskowiak27-Jun-19 5:59 
GeneralRe: Base toString not printing to console Pin
Member 1451443227-Jun-19 6:14
memberMember 1451443227-Jun-19 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.