|
-
Feb 19th, 2001, 04:40 PM
#1
Thread Starter
Lively Member
Hey ya'll
Does anybody know how to delete this statement instead of selecting it?
Code:
strSql = "SELECT PartNO, Reg, WorkO FROM dOrder GROUP BY PartNO, Reg, WorkO HAVING COUNT(*) > 1"
thx in advance for any help
//Patrick
-
Feb 20th, 2001, 09:23 AM
#2
Member
I think you want to delete the items that occur in your query. If so I think this will cover you.
DELETE FROM dorder WHERE PartNO, Reg, WorkO IN
(SELECT PartNO, Reg, WorkO FROM dOrder GROUP BY PartNO, Reg, WorkO HAVING COUNT(*) > 1)
This will remove the whole record not just the three
items.
-
Feb 20th, 2001, 10:58 AM
#3
Hyperactive Member
Yes, I think its the only way: a subquery.
If things were easy, users might be programmers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|