Solved

deleting table rows with SQL Server 2005

Posted on 2007-03-20
6
233 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
Comment Utility
Right click on the table --> Open table
0
 

Author Comment

by:PhilMuller
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:PhilMuller
Comment Utility
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
Comment Utility
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
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now