There are these things called "Stored Procedures". It's something that sits around and when triggered, does something. That's all. I opened one of them here at work to see what it did. Then I burst out laughing. Because I saw this:
replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace((i.description),'&','&'),'&#','&#'),'™','™'),'>','>'),'<','<'),'"','"'),char(39),'''),'—','-'),'‘','''),'’','''),'…','...'),'“','"'),'”','"'),'®','®')
If you know nothing about code, you still should be able to see the hilarious nature of this. Basically, it's taking in a string (you can think of a string as a word) and replacing all characters to be SQL friendly. In other words, if your word was "O...M...G", it would replace all the '...' .
But seriously, how would anyone understand what this is doing? Is the best way to do this really to have a million replace statements in one line? I don't know everything (or much) about SQL but to my non-expert eyes, this does not look good.
If someone wants to tell me that this is standard and done all the time and is perfect then I'll humbly admit defeat. But for now, I'll keep giggling.
Yours,