473,382 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

delete records

Hello,

I have a database called articles

I want to delete all articles from a subgroup e.g. DVD

If I am in the enterprisemanager what steps do I have to take to do this

thanks in advance

Paul
Sep 20 '05 #1
5 24520
I would do it in Query Analyzser (from EM you can select Tools, SQL
Query Analyzer)

Something like this:

BEGIN TRAN

DELETE
FROM articles
WHERE subgroup = 'DVD'

SELECT * FROM articles

ROLLBACK TRAN

Once you've verified that it deleted what you expected then change the
ROLLBACK to COMMIT.

Make sure you have a backup.

--
David Portas
SQL Server MVP
--

Sep 20 '05 #2
Hello David,

thank you for your answer it is exactly what I need

kind regards Paul
"David Portas" <RE****************************@acm.org> schreef in bericht
news:11**********************@g44g2000cwa.googlegr oups.com...
I would do it in Query Analyzser (from EM you can select Tools, SQL
Query Analyzer)

Something like this:

BEGIN TRAN

DELETE
FROM articles
WHERE subgroup = 'DVD'

SELECT * FROM articles

ROLLBACK TRAN

Once you've verified that it deleted what you expected then change the
ROLLBACK to COMMIT.

Make sure you have a backup.

--
David Portas
SQL Server MVP
--

Sep 20 '05 #3
Hello David

Actually I want do also a rename command
this means not delete the record however change all subgroups with DVD in
e.g. VHS

kind regards Paul

"David Portas" <RE****************************@acm.org> schreef in bericht
news:11**********************@g44g2000cwa.googlegr oups.com...
I would do it in Query Analyzser (from EM you can select Tools, SQL
Query Analyzer)

Something like this:

BEGIN TRAN

DELETE
FROM articles
WHERE subgroup = 'DVD'

SELECT * FROM articles

ROLLBACK TRAN

Once you've verified that it deleted what you expected then change the
ROLLBACK to COMMIT.

Make sure you have a backup.

--
David Portas
SQL Server MVP
--

Sep 22 '05 #4
SQL
UPDATE articles
SET subgroup ='VHS'
WHERE subgroup = 'DVD'

http://sqlservercode.blogspot.com/

Sep 22 '05 #5
I have a similar project

Database called Spot_Movers

table called Files

and column called End_Date

I need delete all records prior to 2/1/2005

I will write this out in Query Analyzer

I am just getting into the whole SQL and I am sort of struggling

TYIA

Drew
Oct 5 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex | last post by:
Hi, hi have a table with 2.5 million records which i try do delete. i have several constraints on it too. i tried to delete the records using delete but it does not seem to work. the delete runs...
9
by: Robert Schneider | last post by:
Hi to all, I don't understand that: I try to delete a record via JDBC. But I always get the error SQL7008 with the error code 3. It seems that this has something to do with journaling, since the...
6
by: Paul T. Rong | last post by:
Dear all, Here is my problem: There is a table "products" in my access database, since some of the products are out of date and stopped manufacture, I would like to delete those PRODUCTS from...
8
by: John Baker | last post by:
Hi: Access 2000 W98! I have a table with numerous records in it, and am attempting to delete certain records that have been selected from it. These are selected based on the ID number in a...
3
by: Tim Marshall | last post by:
HI all, Access 2003, Jet back end. Rather than annoy my users in a particular app by having relationships with enforced relational integrity refuse to delete a record with related records, I'm...
2
by: Cornelius Buschka | last post by:
Hi, we saw the following problem: We deleted all rows from a table B referencing table A (~500000 records). No problem, but the following try to delete all records from table A (~180000) lead...
6
by: satish mullapudi | last post by:
Hi All, I am getting strange situation. These r the steps I have followed: 1. Created an EMPLOYEE table with around 14 fields & 688038 records. (so a large table indeed). 2. Tried to delete all...
2
kcdoell
by: kcdoell | last post by:
Hello I have a code where I want to delete the records that are found in my DAO recordset. I took a stab at this for the first time and got it to work but it is only delete one record at a time. If...
6
by: scott.tang | last post by:
I'm experiencing a very strange problem. My application is MS Access front-end and MS SQL server back-end database. I have a SQL statement that deletes records from a table after an export...
5
WyvsEyeView
by: WyvsEyeView | last post by:
Upon clicking Delete to delete the current record on frmTopics, I want several things to happen: 1) Display a custom message rather than Access's standard "You are about to delete n records" one....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.