show column data as rows

  • Hi

    I have 3 tables I wnat to show the data in this format

    tbl_Student contains StdName,Addr1,Addr2,Addr3

    tbl_Area AreaName,adrrs1 addrs2,addrs3

    tbl-Incharge InchName,Addr1,Addr2,Addr3

    Column1 Column2

    =======================

    AreaName1 AreaName2

    Address Address

    Inchname1 InchName2

    Address Address

    Student1, Student1

    Address Address

    Student2, Student2

    Address Address

    Student3 Student3

    Address Address

    thanks in advance

  • Maybe it's just a bit late for me but I'm thinking you're going to have to explain the mapping on that one just a wee bit more than you have. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I'm not exactly sure of what your requirements are, but it seems UNION would help you out in constructing your query.

    --
    :hehe:

  • Dude...out of context... but is that Zidane doing the head-butt on your avatar? :hehe:

    --
    :hehe:

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

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