Wednesday, March 14, 2007 12:06 PM
royashbrook
nopatchforstupid #4 - of trims and empty values
stupidselect f1 from t where ltrim(rtrim(f2)) != ''not stupidselect f1 from t where ltrim(f2) != ''why?you could use ltrim or rtrim by itself. why are you trimming both sides when you are searching for an empty. if it trims to empty, then either one will result in the same. the only time you would need both is if you actually want to trim a string on both sides, here you just want to exclude strings with just spaces.
Filed under: sql, nopatchforstupid