SQL Join Statement

Results 1 to 2 of 2

Thread: SQL Join Statement

  1. #1
    Join Date
    Dec 1969

    Default SQL Join Statement

    I have some problem for construction SQL Statement.<BR>Table 1 is having ID, Name, status_code, sub_Status_Code,referenceID<BR><BR>Table 2 is having description for status_code & sub_Status_Code<BR><BR>Table 3 is having description for referenceid<BR><BR>I need to display all records in table1 with description of status_code,subStatus Code ,& reference id.<BR><BR>Can anyone please help me to find out.<BR><BR>thanks<BR>rams <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Join Statement

    SELECT t1.ID,t1.Name,t1.status_code,t2.status_code_descr, t1.sub_status_code,t2_2.sub_status_code_descr,t3.r efr_descr FROM table1 t1 INNER JOIN table2 t2 ON t1.status_code = t2.status_code INNER JOIN table2 t2_2 ON t1.sub_status_code = t2_2.sub_status_code INNER JOIN table3 t3 ON t1.referenceID = t3.referenceID <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts