Derived Tables

Hi,
I am struggling with building queries with derived tables.  can someone give me some insight into this.  I want to use the design view to do this, since I am not good at understanding the sql statements.  Most of the postings on the web show you how to do this with sql statements.  I would like to know how to do this in visual studio, in diagram using the query builder when connecting to an sql server.
Thanks
joygomezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anthony PerkinsCommented:
Senz79,

The question had to do with using Derived tables in SSMS.  You have posted two links to articles on LINQ and one on Reporting Service.  If they were not posted in error you may want to elaborate how they are related to the question posed by the author.
0
Anthony PerkinsCommented:
joygomez,

>>Most of the postings on the web show you how to do this with sql statements.  <<
You will find most users are more experienced writing the query from scratch using the query window.  There is good reason for that, the design mode is very limiting and after you have accomplished the basics you will find that you cannot build anything more advanced.  Derived tables may be an example of this.
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

joygomezAuthor Commented:
acperkins:
i guess i am used to ms access where i was able to do anything using nested queries.  are there any good articles on how to write queries based on derived tables.
thanks
0
Anthony PerkinsCommented:
>>i guess i am used to ms access where i was able to do anything using nested queries.<<
Right, I realized that.  Unfortunately, to reap the full benefit of SQL Server you have to roll up your sleaves and qrite queries the old fashioned way.  The Designer Tools are too constraining and limit you to just the simplest of queries.  For example, I understand that a simple VIEW containing a UNION queries is verboten.  It could well be that you can create a query with a Derived table, I simply do not know, I have never had the need or inclination to try.

Of a somewhat related note, derived tables have to some extent been replaced by CTEs, so you may want to read up on those.  And I very much doubt you could create a VIEW containing a CTE using the Designer Tools.

>>are there any good articles on how to write queries based on derived tables.<<
To be honest I do not know of any specific to Derived tables. But doing a search on Google I came across these articles which may help:
Speed Tips For SQL Server SELECT Statements
http://www.sql-server-performance.com/articles/per/speed_select_tips_p1.aspx
Derived Tables in SQL
http://www.4guysfromrolla.com/webtech/112098-1.shtml
Eliminate the Use of Temporary Tables For HUGE Performance Gains
http://www.sql-server-performance.com/articles/per/derived_temp_tables_p1.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
joygomezAuthor Commented:
Thanks a lot for your constructive views.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.