Solved

deleting table rows with SQL Server 2005

Posted on 2007-03-20
6
237 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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…

911 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

16 Experts available now in Live!

Get 1:1 Help Now