How do you drag a table to view diagram Pane

  • There must be a way to drag a table into the design diagram pane of a view. What is the configurate setting to allow this. currently in my SQL Server 2008 R2 install this option is not set up.

  • rick_markham (6/11/2013)


    There must be a way to drag a table into the design diagram pane of a view. What is the configurate setting to allow this. currently in my SQL Server 2008 R2 install this option is not set up.

    Personally I avoid the designer for creating views like the plague because the sql it creates is not the way I would write. That being said I think you are looking for....right click in the top section where the tables are and select "Add Table".

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • I'd like to echo what Sean said about the view designer. It's pretty famous for creating SQL that's completely and totally inefficient. The performance of your applications will suffer as a result. As with all code generation wizards, there's just no substitute for doing it by hand and understanding how things work.

  • thanks for the reply. Actually the issue is some kind of configuration setting with management studio. I can not remember what attribute to set.

    I can right click and add a table. This problem is when I try to drag a table from the Object Explorer to the Design Diagram Pane. I this shows the Zero \ icon saying this feature in not enabled. I want to enable the drag and drop.

  • rick_markham (6/12/2013)


    thanks for the reply. Actually the issue is some kind of configuration setting with management studio. I can not remember what attribute to set.

    I can right click and add a table. This problem is when I try to drag a table from the Object Explorer to the Design Diagram Pane. I this shows the Zero \ icon saying this feature in not enabled. I want to enable the drag and drop.

    Again your absolute best approach is to close the view designer and forget that it exists.

    I have no idea why you would not be able to drag and drop as you said. I tried the designer and it works for me. I had not opened that in a LONG time before your post today. 😉

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • On your comment around my choice for view design it is personal preference. We use SQL Server as a staging area for data migration using SAP Data Services so while your comments may be valid it is not relavant for our use of SQL Server.:-)

    That being said. your observation is my issue. I know you can drag and drop tables from the explore into the view design diagram pane. In my install of SQL server 2008 R2 this setting seems to be turned off. I am looking for the particular setting that will turn it on.

    As you said it does work and i can do it on a different install at my client site.

    thanks

  • rick_markham (6/12/2013)


    On your comment around my choice for view design it is personal preference. We use SQL Server as a staging area for data migration using SAP Data Services so while your comments may be valid it is not relavant for our use of SQL Server.:-)

    That being said. your observation is my issue. I know you can drag and drop tables from the explore into the view design diagram pane. In my install of SQL server 2008 R2 this setting seems to be turned off. I am looking for the particular setting that will turn it on.

    As you said it does work and i can do it on a different install at my client site.

    thanks

    I understand what you are saying about how you use sql. My point is that the views created are notoriously slow when using the designer. 😉

    As to your issue. I don't know of a setting for this. This may sound a bit bizarre but...by chance are you running Windows7? If so, is drag and drop working in other applications? I have on more than one occasion run into a strange scenario in Win7 that prevents drag and drop.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • I'm running Win7 32-bit. The 32-bit part is not my choice. :crazy: I didn't see anything in the designer options at all to control this.

    I just tried using the query designer and drag and drop to add tables worked fine for SQL 2005 and 2008.

    It didn't work when I connected to a SQL 2008 Express instance. That's all I've been able to find.

  • thanks for trying to help. I think a DBA out there should be able to point me to the correct setting. I had a DBA show me in the past but I have since forgetten how to get the drag and drop to work.

    Any DBA out there please help...

    On the performance just curious:

    are you saying the if I write a view in the GUI design interface and I (select * from table where some condition is true) and then save the view that this will be more inefficient that typing (alter view NAME as select * from table where some condition is true)?

    Which is about as complicated of a view I need to write.

    That seems odd if true.

    I can see your point if you are trying to add hints etc for large data sets and complex joins.

  • rick_markham (6/12/2013)


    thanks for trying to help. I think a DBA out there should be able to point me to the correct setting. I had a DBA show me in the past but I have since forgetten how to get the drag and drop to work.

    Any DBA out there please help...

    On the performance just curious:

    are you saying the if I write a view in the GUI design interface and I (select * from table where some condition is true) and then save the view that this will be more inefficient that typing (alter view NAME as select * from table where some condition is true)?

    Which is about as complicated of a view I need to write.

    That seems odd if true.

    I can see your point if you are trying to add hints etc for large data sets and complex joins.

    First, you really shouldn't be doing SELECT * FROM sometable in your views. You should explicitly declare the columns you are returning in the view.

    Second, what is being said is that as you gain more experience and need to write more detailed and complex views you will find the GUI limiting. It is better, IMHO, that you learn to write your views using T-SQL (CREATE VIEW ...) and alter your views (ALTER VIEW ...) now so that you gain the experience now.

    But please, and I mean this sincerely, continue asking questions. This is how you will learn and there are many of us out here more than willing to share our knowledge and experience.

  • rick_markham (6/12/2013)


    thanks for trying to help. I think a DBA out there should be able to point me to the correct setting. I had a DBA show me in the past but I have since forgetten how to get the drag and drop to work.

    Any DBA out there please help...

    On the performance just curious:

    are you saying the if I write a view in the GUI design interface and I (select * from table where some condition is true) and then save the view that this will be more inefficient that typing (alter view NAME as select * from table where some condition is true)?

    Which is about as complicated of a view I need to write.

    That seems odd if true.

    I can see your point if you are trying to add hints etc for large data sets and complex joins.

    Not at all. If all you are doing is creating views from a single table then it won't make any difference at all. The performance issues start popping up once you have more than 1 table. It tends to make very inefficient joins. 😛

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 11 posts - 1 through 10 (of 10 total)

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