Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server Update records

Posted on 2013-05-19
4
Medium Priority
?
477 Views
Last Modified: 2013-05-19
I am working with SQL Server 2000 (connecting with SSMS 2008).
In SSMS if I click on Open Table (or Open x # of Records) I can then edit the records that are displayed.  If I run a Select Query and then view the results set.  Is there a method where I can have the results displayed in edit mode?  I want to be able to edit the records manually that are returned from a select statement without having to do this with an update query.   I have no issue doing this with an update query, but someone else was asking me if their is a way to do this.  Thanks.
0
Comment
Question by:fjkaykr11
  • 2
4 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 39179547
No way in SSMS. You need to write UPDATE statement for your SELECT statement. Or you have to update the records the way you are updating from the right click menu option.
0
 
LVL 3

Author Comment

by:fjkaykr11
ID: 39179600
thanks for the info. I didn't think there was a way to do this I just was just checking.
0
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 39179659
Yes, it is possible. When you right click and select Open Table, the Show SQL Pane option is available as one of the icons. If you edit the SQL to the SELECT statement you want, the results are still editable (I have only ever tried with simple filters). Works on my SQL Server 2005 and 2012 standard SSMS.
0
 
LVL 3

Author Closing Comment

by:fjkaykr11
ID: 39179768
Thanks for the info.  I think that is what I need.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question