If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Question about GROUP BY and Views

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-01-04, 05:31
Nishchal Nishchal is offline
Registered User
 
Join Date: Aug 2004
Posts: 5
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...
Reply With Quote
  #2 (permalink)  
Old 08-01-04, 08:04
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On