2 Replies Latest reply: Nov 12, 2012 12:32 PM by sb92075 RSS

    join statement

    78221
      I have a statement that does not make since. I’m getting this from the architect for building a diagram.


      SELECT li.level_inent_desription FROM
      bt_data_3m_maintenance d3m
      JOIN xxxx.bt_rin_to_fin rtf ON rtf.rin = d3m.rin JOIN xxxx.bt_model m ON m.fin_key = rtf.fin_key JOIN xxxx.bt_level_indent li ON li.level_indent_key = m.l2_key;

      The first select statement data attribute is not even in the table. So the joins won’t work. If they would this means to join on the right or at the end of the table for reference??

      Am I missing something?
        • 1. Re: join statement
          Peter vd Zwan
          Hi,

          >
          Am I missing something?
          >

          Yes!

          To name a few:
          The oracle version.
          The
           tags around the sql
          The proper formatting of the sql
          The table definitions
          ...
          
          Regards,
          
          Peter                                                                                                                                                                                                                                                                                                                                                                                                                                    
          • 2. Re: join statement
            sb92075
            it looks OK to me
            SELECT li.level_inent_desription 
            FROM   bt_data_3m_maintenance d3m 
                   join xxxx.bt_rin_to_fin rtf 
                     ON rtf.rin = d3m.rin 
                   join xxxx.bt_model m 
                     ON m.fin_key = rtf.fin_key 
                   join xxxx.bt_level_indent li 
                     ON li.level_indent_key = m.l2_key; 
            How do I ask a question on the forums?
            SQL and PL/SQL FAQ