Combine multiple tables into 1 table

  • please excuse this noob question.

    I have 1 Db and want to combine allthe tables from it into 1 table.

    These tables were in crystal and I have now imported them into SQL.

    Previously they were using Joins to produce the reports.

    Since I will now be using reporting services via Sharepoint I wanted to combine all the tables into 1 so I would not have to use joins.

    Any help would be appreciated. If you need more info please ask.

  • starting with the basics, to join them, they all have to have something in common...typically it is some ID...we kind of know that the relationship exists, because previous reports were using JOINS.

    the best thing to do in my opinion is to not fiddle with redoing the tables, simply create a VIEW which joins everything together , and report off THAT..

    CREATE VIEW VW_AllTogether

    As

    SELECT *

    FROM tbl1

    left outer join Tbl2 on tbl1.Id = Tbl2.Id

    left outer join Tbl3 on tbl1.Id = Tbl3.Id

    etc etc

    ravi.mathaudhu (10/27/2008)


    please excuse this noob question.

    I have 1 Db and want to combine allthe tables from it into 1 table.

    These tables were in crystal and I have now imported them into SQL.

    Previously they were using Joins to produce the reports.

    Since I will now be using reporting services via Sharepoint I wanted to combine all the tables into 1 so I would not have to use joins.

    Any help would be appreciated. If you need more info please ask.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • my thoughts exactly

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Rather than actually combining the tables into a new table, I would suggest setting up a materialized view over all the tables. (that is view with index)

    This will be easier to maintain.

    The more you are prepared, the less you need it.

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

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