|
|
|
Mr or Mrs. 500
      
Group: Administrators
Last Login: 2 days ago @ 9:24 AM
Points: 511,
Visits: 948
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 4:00 AM
Points: 197,
Visits: 455
|
|
I am usually quite happy to criticise what I think are bad aspects of SQL Server (or other products), but in this case I am more inclined to say:
Which part of REPLACE don't you get then?
|
|
|
|
|
Mr or Mrs. 500
      
Group: Administrators
Last Login: 2 days ago @ 9:24 AM
Points: 511,
Visits: 948
|
|
As I tried to express in the editorial, I guess I initially, and wrongly, had a tendency to see REPLACE as "general purpose" command, whenever restoring over an existing database, and so included it in code where it wasn't necessary. It struck me as a case where a better name might encourage a more cautious approach to its use, though I hardly intended the piece as a strident criticism of SQL Server.
If it turns out I'm the only one who was initially unaware of the "safety checks" that use of REPLACE disables then we can all move on .
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415,
Visits: 2,333
|
|
user interface is hard! I like the idea of a "force" like keyword being required when bypassing all the safety checks, but its probably best to research combinations of keywords especially with T-SQL. I know this website wouldn't be the first to contain remarks about unexpected behavior with SQL server.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 4:00 AM
Points: 197,
Visits: 455
|
|
@Tony
It's probably a matter of taste but I do not see the difference between REPLACE and FORCE_OVERWRITE, except more characters to type; perhaps because English isn't my native language.
And shouldn't you then have the same, or even more, concerns about (for example) UPDATE-without-WHERE? This is much likely to happen because it is not just DBAs that are likely to have permissions to execute one of those... So perhaps we would need
UPDATE ... SET ... WITH FORCE_UPDATE_EVEN_WITHOUT_WHERE
?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:41 AM
Points: 2,064,
Visits: 3,449
|
|
Tony Davis (4/1/2012)
If it turns out I'm the only one who was initially unaware of the "safety checks" that use of REPLACE disables then we can all move on  .
Uh, errr, ummm, well, I always assumed the same Tony. So, I'm sheepishly laughing here but thankful for the additional information. I'll certainly be doing a bit more reading.
David
@SQLTentmaker SQL Tentmaker “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 10:46 AM
Points: 1,290,
Visits: 3,001
|
|
If it turns out I'm the only one who was initially unaware of the "safety checks" that use of REPLACE disables then we can all move on  .
Time to move on.
"Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ... "
|
|
|
|
|
Mr or Mrs. 500
      
Group: Administrators
Last Login: 2 days ago @ 9:24 AM
Points: 511,
Visits: 948
|
|
Thanks everyone, for the feedback.
Personally, I'd be very surprised if everyone was aware of it, plus the concept of a "force flag" that indicates when certain checks are being bypassed is hardly a new one.
Anyway, onwards and upwards!
|
|
|
|