Solved

deleting table rows with SQL Server 2005

Posted on 2007-03-20
6
240 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
  • 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sql server insert 13 28
string fuctions 4 25
Unable to Uninstall Visual Studio 2015 7 25
VB.NET 2008 - SQL Timeout 9 23
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

776 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