My goal with my portion of this blog is not to do long-winded case studies. I’m not going to go make up some artificial scenario so I can demonstrate something I’m not using. I’ve been in this business for a long time, and I’m always running into things that I probably should have known before now. That’s what I’ll share. All the dirty little secrets and things we’re ashamed to admit that we had to Google. You all know what I’m talking about.
Things you ought to know about me:
Given the choice, I like CAST over CONVERT. CONVERT sounds so, well, permanent. And if pressed, I’ll admit that CAST just sounds cooler. Like I’m performing some sort of datatype magic. I pronounce varchar so that it rhymes with “hair care”. But I always hesitate before saying varchar out loud, because there are so many variations on pronunciation that I worry about sounding weird. I use LEFT joins. RIGHT joins are for pretentious people. So is the word tuple. Quit showing off. And by the way, I don’t say “datum”. It’s “data” all the time. I know it’s not grammatically correct, but I don’t care. I hate COALESCE. I’ll use it, but tentatively. I like simplicity. I want people to look at my work and find themselves nodding. If you have to explain it, then it ain’t art, sugar. I indent. I capitalize. I document. I can’t remember what I had for breakfast yesterday; I sure as hell can’t remember why I did that weird thing with the data last year. I believe in table aliases that mean something. If the table name is ProductOrder, then my alias will be “po” damn it. Entities are singular. Underscores are evil. Back to aliases… I’m so anal that I’ll catch myself aliasing a table when I’m not even joining to anything else. If someone put a gun to my head, I don’t think I could write a cursor correctly. They don’t make sense to me. I think in sets, and if forced, I loop. I love Common Table Expressions. They’re just pretty on the page. WITH is a great keyword. I assume that the requirements are going to suck or not exist. That way, I’m never disappointed. I still search Books Online for most syntax. PIVOT intimidates me. Normalization is beautiful. Selective denormalization can be beautiful too. I want to know enough about my subject matter/industry/business to qualify as a junior business analyst. And I believe in long, slow, deep, soft, wet kisses that last three days. (I couldn’t resist)