Browse by Tags

All Tags » nopatchforstupid (RSS)
stupid select f1 from t where ltrim ( rtrim (f2)) != '' not stupid select 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...
Posted by royashbrook | with no comments
Filed under: ,
today's item of stupidity is the dynamic orderby clause. i see this particular abomination all over the place when i'm refactoring procs, reports, etc. firstly, why is this bad? firstly, most people include a null check and then build a dyanmic sql statement...
Posted by royashbrook | with no comments
Filed under: ,
stupid @@identity not stupid scope_identity ()
Posted by royashbrook | with no comments
Filed under: ,
stupid 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 public bool CleanUpTable( decimal id) { bool bRet = true ; try { if (db ! = null ) { DbCommand dbCommand = db.GetStoredProcCommand( "delete proc...
Posted by royashbrook | with no comments
Filed under: ,