Solved

deleting table rows with SQL Server 2005

Posted on 2007-03-20
6
244 Views
Last Modified: 2010-03-19
Is there any way to directly edit a table using SQL Server Management Studio (2005)?  I need to delete rows in a table as you could do under Enterprise Manager, but I can't see a way to do it with the new software.
0
Comment
Question by:PhilMuller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:gpompe
ID: 18758749
Right click on the table --> Open table
0
 

Author Comment

by:PhilMuller
ID: 18758770
I do that, but it only lets me delete values in individual cells.  How do I delete the whole row (record).
0
 
LVL 20

Assisted Solution

by:Sirees
Sirees earned 62 total points
ID: 18759123
You need to click on the little forward arrow head sign (you will see this in the first column) to select the entire row. Once you select the row right clcik and choose delete
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:PhilMuller
ID: 18759243
Ok, so I click the arrow to select the whole row and then right-click and click Delete.  It prompts me that I am about to delete a row and I say OK.  It then tells me that the data has changed (I haven't changed it), but to commit changes anyway, click Yes.  I click Yes and it tells me it can't delete the row because the data has changed!  Just to make sure I wasn't going crazy, I completely exited out and came back in and nobody else is in the database and I still get the same messages.
0
 
LVL 9

Accepted Solution

by:
gpompe earned 63 total points
ID: 18759766
Do you have a Primary Key on that table ? If not you need one to use this tool

Another option is using msqry32.exe that comes with Office. Sometime is installed as Microsoft Query in the Office program group. If you do not have this, look for it in your ofice folder.
0
 

Author Comment

by:PhilMuller
ID: 18764377
I tried to create a primary key, but it wouldn't let me.  There were duplicate records (keys) and so it couldn't create the primary key.  The duplicate record problem is the problem I'm trying to fix in the first place.  I then try to change values in the row to make the duplicate records unique (so I can later remove them), but it wouldn't let me.  So, it seems like a catch-22.  I've figured out another way to solve this problem that is actualy a bit more efficient.  Thanks for your help though.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

728 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