Not a good day to end the day.
-
Let's hope the OP had a backup. :)
The difficult we do right away... ...the impossible takes slightly longer.
I had a backup, but lost lost an hour worth of work, which is not bad considering the size of the table
Yusuf May I help you?
-
I meant to delete five rows from a table and wrote very quickly this
delete dbo.tblXYZ
where ID >= 116 or ID <= 120ended blowing the whole table away. Talk about blowing your feet off I know, I know it should have been
AND
notOR
, it is too late now. :-O UPDATE: I have a backup, but lost a hour worth of work...Yusuf May I help you?
That's what you use
BETWEEN
for. Less ambiguity.Wrong is evil and must be defeated. - Jeff Ello[^]
-
Real men do not care. They simply run the query. And then in middle of night they restore the backup that they did before running the query.
My CP workspace: Incredibly trivial and probably useless code samples[^]
being real man cost me my sleep ;P
Yusuf May I help you?
-
You had backups of course? :)
Along with Antimatter and Dark Matter they've discovered the existence of Doesn't Matter which appears to have no effect on the universe whatsoever! Rich Tennant 5th Wave
what backup? Real men don't backup :doh: I do, but lost an hour worth of work, which is not bad considering the size of the table if I didn't backup
Yusuf May I help you?
-
Ummm, is "I didn't do it" an option? If not, run, run away.
My CP workspace: Incredibly trivial and probably useless code samples[^]
I'm the sole creator and maintainer of the data. No where to run :-O
Yusuf May I help you?
-
what backup? Real men don't backup :doh: I do, but lost an hour worth of work, which is not bad considering the size of the table if I didn't backup
Yusuf May I help you?
Backup as in a bucket of 1s and 0s, in a logical order of course. :)
Along with Antimatter and Dark Matter they've discovered the existence of Doesn't Matter which appears to have no effect on the universe whatsoever! Rich Tennant 5th Wave
-
I meant to delete five rows from a table and wrote very quickly this
delete dbo.tblXYZ
where ID >= 116 or ID <= 120ended blowing the whole table away. Talk about blowing your feet off I know, I know it should have been
AND
notOR
, it is too late now. :-O UPDATE: I have a backup, but lost a hour worth of work...Yusuf May I help you?
-
Klingon developers like bold personalities like yours.
Yusuf wrote:
UPDATE: I have a backup, but lost a hour worth of work...
Some man points gone away...
Veni, vidi, vici.
-
I meant to delete five rows from a table and wrote very quickly this
delete dbo.tblXYZ
where ID >= 116 or ID <= 120ended blowing the whole table away. Talk about blowing your feet off I know, I know it should have been
AND
notOR
, it is too late now. :-O UPDATE: I have a backup, but lost a hour worth of work...Yusuf May I help you?
-
To avoid such problems, I usually substitute a SELECT query using the desired conditional clause to see what records will be affected BEFORE executing the DELETE query. I hope it wasn't anything you can't recreate!
The difficult we do right away... ...the impossible takes slightly longer.
I do the same thing for an update as well, I may not qualify as a real man but I don't trash table these days.
Never underestimate the power of human stupidity RAH