Editing data in SQL Server 2005


This is a question about the use of  SQL server 2005 express.
I notice that when I right click on one of my tables (in the left hand pane), lets say 'users',  I am able to "open" it. Here I can see all of my data. If I want to edit one of the fields in this grid that is returned, I can simply select the field, backspace over the old data and enter in my new data. Then if I switch my cursor to another record, the edit I just made is saved.
However, if I do a query (select * from users). The result set I get back will not let me edit any of the fields in the same way I was able to before while just opening the whole table. Instead I need to actually edit the record by issuing an SQL statement.
Is there a way for me to edit the records returned by a SELECT query in the same way I'm able to edit them by opening the entire table.

FYI -- I can certainly write the UPDATE query but in the case of the data I'm dealing with it's much easier to edit the record the 'faster' way.

Thanks very much,
Who is Participating?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you have to use the "open table", and then adjust the query that is used implicitely behind, by adding the sql view, and change and rerun the query.
You can edit a table using a view, provided the view and the table meet the requirements for updateable views. Do not attempt this in a production system. The table edit function is buggy and dangerous and should not be used with "live" data that can't be recovered.

Historical note: Microsoft dropped this feature from early betas of SQL Server 2005. It was put back (somewhat regretably in my opinion) only after some users complained. Judging by the results it has never received enough attention from the dev team or from testers.
michaelshavelAuthor Commented:
That did it. Thanks.
Curious, why does it work this way and not when I run a "new query"?

Thanks again,
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.

All Courses

From novice to tech pro — start learning today.