Help for a query

  • I come to the following tables from queries results.

    From these tables I wish to get the results as shown in tbl_results. I can't see how to have it done. Can anyone help me please?

    tbl_type1

    city site type1

    Montreal HOST 33

    Montreal JNQ1 7

    Montreal JNQ2 7

    Montreal SAMC 2

    tbl_type2

    city site type2

    Montreal HOST 1

    Montreal JNQ2 1

    Montreal SAMC 1

    tbl_type3

    city site type3

    Montreal LAKG 1

    Montreal SPSW 1

    tbl_results

    city site type1 type2 type3

    Montreal HOST 33 1 0

    Montreal JNQ1 7 0 0

    Montreal JNQ2 7 1 0

    Montreal SAMC 2 1 0

    Montreal LAKG 0 0 1

    Montreal SPSW 0 0 1

  • I think its exactly what is there here. Please have a look at this discussion,

    http://www.sqlservercentral.com/Forums/Topic807524-149-1.aspx

    ---------------------------------------------------------------------------------

  • You make my day SSC-Enthusiastic.....

    I thank you very much! It works great :-P:-D:-);-):w00t::cool::hehe:

  • u r welcome 🙂

    BTW which query did you use out of those three which are there?

    ---------------------------------------------------------------------------------

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

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