Tamil Selvan

Tamil Selvan

  • 1.6k
  • 155
  • 6.7k

Need sql query for two tables join and two different column

Jul 3 2020 11:06 AM
Dear all,
 
     I need a query as below pasted tables. I expected result for marked as table2 NAME column in Blue & Red based on C_ID1 & D_ID2 and join query as table1.
 
 
F_ID1 Name F_ID2




110 A 109
TABLE1



103 B 103




105 C 108




1017 D 1017




1023 E 1407
















TABLE2











CNAME C_ID1 NAME REMARKS VALUE D_ID2 NAME LEVEL
ABC 110  A TEST 1000 103 B SENT
BBC 103  B INTERNAL 1000 103 B INTERNAL
ABC 1017 D DELIVERY 200000 1407 E FINAL
 

Answers (6)