Solved

i mess up i want to delete all regs >5633 in sql server is that posible

Posted on 2014-09-23
6
115 Views
Last Modified: 2014-10-20
i mess up i want to delete all regs >5633 in sql server is that posible

sql server
0
Comment
Question by:edo60
  • 2
  • 2
  • 2
6 Comments
 

Author Comment

by:edo60
ID: 40340447
i want to
delete from instrumentos where recno>5633
tsm
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 40340521
delete from instrumentos where recno>5633


Well, the syntax looks correct, but ...
Make sure you have a backup in case something goes wrong.

How many records will you be deleting? (if it is a lot consider doing it in smaller batches)

Are there any constraints? (i.e. are other tables affected by this)?

Only you know that database; We only know as much about that db as you have included on this page.
0
 
LVL 47

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40340977
So, you have the correct DELETE statement.
What you need more?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:edo60
ID: 40342431
i mean
i have not the recno field,
is any way to have the reference of the recnumber by the system and procede?
tsm
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 40343067
can you provide the complete table definition? (field names, types etc.)

and perhaps a few rows of data too?

If you do not have a [recno] field how do you know that you need to delete where recno > 5633 ?
0
 
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40343322
Are you saying that recno isn't a column from a table? If so, do you want to mean ROWNUMBER?
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SELECT query on two levels (detail and summary) 13 49
SQL Error - Query 6 24
sql server tables from access 18 17
VB.NET 2008 - SQL Timeout 9 23
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

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