Spaced-Out Strings
'I came across this in a code review not long ago:
Three things pop into my head when I see this sort of thing:
-
That’s hard to read
-
That’s a whole lot of parentheses
-
Whoever wrote it is unfamiliar with the SQL standard about comparing strings
It’s the last item in that list I want to talk about first, because the SQL standard specifies rules for comparing padded and unpadded strings that make that RTRIM unnecessary.
For one thing, the LEN function could care less about trailing spaces. It ignores them. Pays no mind whatsoever. Just watch...'...
http://www.sqlservercentral.com/blogs/the-monday-morning-dba-/2017/11/13/spaced-out-strings/
Trackbacks
Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.
Kommentare
Ansicht der Kommentare: Linear | Verschachtelt