Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Server Management Studio Question

Author  Topic 

cpuguru11
Starting Member

2 Posts

Posted - 2009-10-08 : 11:04:17
When using MS SQL Management Studio I can select a table from a database and click open, then edit a field in the table.
But when I do a select and get my result set in the Results window, why can't I select a field and edit the field?

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2009-10-08 : 11:10:11
Basically because you're in a results set window, not a view. If you run your select statement thru a view, you could alter the data directly.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

cpuguru11
Starting Member

2 Posts

Posted - 2009-10-08 : 12:27:38
Toad allows me to do this and I was just wondering if SQL MS Studio would allow me to do the same.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-08 : 12:46:04
quote:
Originally posted by jimf

Basically because you're in a results set window, not a view. If you run your select statement thru a view, you could alter the data directly.

Jim

Everyday I learn something that somebody else already knew



Huh?

Right click on the table and choose OPEN SEASAME....ummm...TABLE



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2009-10-08 : 13:01:23
He wanted to know why you can't edit data in a results set window (meaning he ran a query), but he can when he opens the table up in SSMS. What would you have said? If you sarcastically hit the OPEN SESAME button, isn't that a view, or are you now magically in the table?

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-08 : 13:25:57
nope...misread that part...no if s/he's opened the table in SSMS then that's about it...

I always wondered if it's holding a row lock..and if it ever escalets to a table lock when doing that

Best bet...is to write DML statements so it's repeatable across environments

Besides getting more practice in the true art of db admin/maint/dev



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jrlandau
Starting Member

1 Post

Posted - 2009-12-07 : 14:04:55
You can do this--you can change the SQL that MS uses to open the editable result. In SQL 2008 the button is called "show sql pane"; you can then edit the sql and get your own editable result.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-12-07 : 14:35:55
SSMS is like using a rubber that is not guaranteed to work





Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -