[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

deleting table rows with SQL Server 2005

Posted on 2007-03-20
6
Medium Priority
?
248 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 186 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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 189 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
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…

650 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