Davin Martyn

Davin Martyn

  • NA
  • 8.7k
  • 3m

Write query

May 4 2015 3:40 AM
Hi,
i have two table agentlist and agent . in agentlist table first_name, last_name, agency coloumn


and agent table name, cont_no. i want to find the agency column value 
when we concat first_name+ ''+ last_name now compare with name column after concat name is avilable on name column then agency column related record show if not find then agency column show null.

how to write query please describe .
EX : NAME = RAJESH TRIPATHI

FIRST_NAME + ''+LAST_NAME = RAJESH TRIPATHI
NOW COMAPRE WITH NAME COLOUMN IF RAJESH TRIPATHI AVILABLE THEN AGENCY COLUMN SHOW RELATED RECORD. 

Answers (2)