Data Retrieval Question

  • Hi Friends,

    I have condition as below

    Table1

    ColumnA

    1111

    1112

    1113

    Table2

    ColumnA ColumnB ColumnC

    1111 10 100

    1112 11 100

    1113 12 101

    Table3

    ColumnB ColumnC ColumnD

    10 100 50

    11 100 55

    12 101 56

    I want to retrieve the data from Table3 columnD values based on the Table 2 ColumnB and ColumnC whicd inturn depends on with Table1 ColumnA relationship.

    Please let me know how to query looks like.

    Thanks in advance...

  • try out this.....

    select * from table1 t1

    inner join table2 t2 on t1.columnA = t2.columna

    inner join table3 t3 on t2.columnb = t3.columnb and t3.columnc = t2.columnc

  • Thanks for the reply.

    But I want the data from the table3 and not from table1.

  • select t3.* from table1 t1

    inner join table2 t2 on t1.columnA = t2.columna

    inner join table3 t3 on t2.columnb = t3.columnb and t3.columnc = t2.columnc

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply