Skip to content
Loading
  • 0
    thank you for reply
    can you tell my more details about your solution
    i cannot understand statment you write above 
    0
  • 0
    Hi Ahmed,
     
    Can you try below query
     
          select M.*
         from #TempMaster tem 
        INNER join [MasterData] M on
         (CASE WHEN ((tem.DailyLogId IS NULL AND tem.StatusGeneralTypeID IS NULL ) AND (tem.SourceGeneralTypeID = M.SourceGeneralTypeID )) THEN  1
        WHEN ( (tem.DailyLogId IS NULL AND tem.SourceGeneralTypeID IS NULL) AND (M.StatusGeneralTypeID = tem.StatusGeneralTypeID)) THEN 1
        WHEN ((tem.SourceGeneralTypeID IS NULL AND tem.StatusGeneralTypeID IS NULL) AND  ( M.DailyLogId = tem.DailyLogId)) THEN 1 END ) =1
    0
  • 0
    thank you for reply
    when i make like that
    1. (CASE WHEN ((tem.DailyLogId IS NULL AND tem.StatusGeneralTypeID IS NULL ) AND (tem.SourceGeneralTypeID = M.SourceGeneralTypeID )) THEN  1  
    what meaning 1 
    are that meaning execute statment or what 
    what mean 1 
    0
  • 0
    Hi,,
    what meaning 1 Means 
     
    condition matched so i set value as 1 and finally condition matched rows will display .
     
    does it work ? 
    0