how to use Subviews in SQL 2005

  • I joined a new company and my first project here is to crack an undocumented code for view creation in a dataware house enviornment.

    They gave me a reference code (it is of now use and it fails everytime they have ran in the past) and I have to write code for the following requirement:

    Right now there are 400+ tables.

    For 250 tables create one sub view. So, there will be 2 sub views.

    When total count for kl_demo_join tables goes over 500, the proc should automatically create a third sub-view.

    Above process should be all dynamic and you can use system tables/views (and Information_schema) to get required information.

    Does anyone have any clue???????;)

  • When you say sub-view, what do you mean exactly? Do you mean to UNION 250 tables together, or JOIN them, or what?

    Please give examples (a couple example table structures, and the example view you'd want). If you don't know that much, show what the input data would look like, and what the view would produce.

  • I agree with the poster above in that we need more clarification. What does a sub-view mean? I haven't heard that term before.

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

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