Solved

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

Posted on 2014-09-23
6
110 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 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40340977
So, you have the correct DELETE statement.
What you need more?
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: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 46

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

DevOps Toolchain Recommendations

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MSSQL: Replace text (typo) 7 34
TSQL previous 5 25
Early & clean exit from a maintenance plan (T-SQL Execution task) 5 22
SQL Field Length for Email Address 3 17
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

867 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

17 Experts available now in Live!

Get 1:1 Help Now