• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

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
0
joygomez
Asked:
joygomez
  • 3
  • 2
1 Solution
 
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
joygomezAuthor Commented:
Thanks a lot for your constructive views.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now