Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    5

    Unanswered: Question about GROUP BY and Views

    Hi All (Again)

    Another quick question...

    I have created a view (1), which extracts info from about 11 tables... this part works fine

    The next thing I do is using a Group By, I break down the View (1) that I have created.

    For the Group By, I have three different selections, and it all depends on which option the user selects, I will run a certain Group By.

    At the moment I have other Views(2,3,4) which references the first view(1) and does the Group By. I have done it this way because I kinder don't know any other way to do this.

    I know this is not the best way to do this type of SQL, but it works. SO!!!

    I have a couple of questions about this way of doing the statements in this manner:

    1. How fast is this way of doing this type of SQL? Referenceing views from views.
    2. Is there a faster way?
    3. Is there another way I could achieve the same result but with another method? Maybe with using less views...

    Thanks in Advance...

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1. How fast is this way of doing this type of SQL? Referenceing views from views.

    it is fast

    2. Is there a faster way?

    not if what you want is a view of a view

    3. Is there another way I could achieve the same result but with another method? Maybe with using less views...

    you could combine a view of a view into one view
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •