95% of all code makes me cry. The other 5% are white space.
select Z || substr( replace( replace( substr( quote(zeroblob( ((X - length(Z) - 1 + length(Y)) / length(Y) + 1) / 2) ), 3 ), "'", "" ), "0", Y ), 1, (X - length(Z)) )
Technically, this code is the SQLite equivalent of the LPAD() function. Please don't ever do this, though!comments powered by Disqus
Send us your own example of code that made you cry! Please include:
Note that we may choose not to publish some submissions if we feel they're not appropriate. We hope you understand.
Use jOOQ, instead of JDBC.
jOOQ generates Java code from your database and lets you build typesafe SQL queries through its fluent API.