select, join, order assistance - simple

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Drew Flickema

    select, join, order assistance - simple

    I have 2 tables similar to

    T1
    -------------------------------------------
    ID | initial |


    T2
    ------------------------------------------
    initial | full_name |

    I want output based on the T1.ID row which has a given ID=' X '
    (If ID = 7 then pretend initial = initial3, as example)

    The first or last row of output to be

    initial | full_name expanding the T1.initial from T2 where T1.ID=' X '
    then all subsequent rows from T2

    In a rough sense would need to look like


    T1.initial3 | T2.full_name3 where ID=' 7 '
    T2.initial2 | T2.full_name2
    T2.initial1 | T2.full_name1
    T2.initial4 | T2.full_name4

    etc.......

    Thanks in advance


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw

Working...