i would like to delete all my quotes.
they have never been deleted and have about 2-3 hundred
*This post is locked for comments
i would like to delete all my quotes.
they have never been deleted and have about 2-3 hundred
*This post is locked for comments
okidoki [ i ] will :)
Oh, one more note on sql. Some sql objects may have names like table or column names we might use, like 'time' or 'date'. So it is a good habit to always use brackets ( [ ] ) around objects you are referring to,
like '[Order]' or '[Type]'.
A small mistake and the consequences could be dire. Ooooooohhhhhh.....
Seriously, use the brackets.
-Jerry
JR Data
thanks for the help ill try it this week
Shouldn't it be
DELETE FROM [Order] WHERE Type=3
I am assuming that Andy is right about the type being 3 for a quote.
Adding 'AND Closed = 0' would mean only open quotes.
If you are not SO savvy, you must go to the SO Administrator, connect to the database
(File/Connect), put this stuff in the query window, and hit the green arrow.
-Jerry
This script that I am posting has not been Tested thoroughly at all. Use at your own risk!
You might want to backup your database just incase it doesnt give you the results you are looking for.
I quickly put this together, and it should be a good starting point for you, but again, this has not been tested at all.
DELETE [Order]
WHERE Closed = 0 AND Type = 3
DELETE OrderEntry
WHERE OrderID NOT IN (SELECT ID FROM [Order])
DELETE OrderHistory
WHERE OrderID NOT IN (SELECT ID FROM [Order])
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156