Normally I comment out lines in a Windows batch script by prefixing them with “::”—it just looks better to me than “REM”. But today I found out the hard way (of course) that you can’t do that inside an IF block, or the script dies with… The syntax of the command is incorrect. http://www.petri.co.il/forums/showthread.php?t=43604
I’ve often been confused and frustrated by conditionals ( … ? … : … ) in SSIS expressions. The concept is straightforward enough, but the syntax made it really hard for me to keep track in nontrivial cases. Then yesterday I had an epiphany: it’s much easier to keep them straight if you write them… Continue reading SSIS Conditional Expressions (Lightbulb:On)
Heads-up! In MySQL, WEEKDAY(‘2012-11-09′) = 4 (0-6 starting on Monday), but in SQL Server, DATEPART(dw,’11/09/2012′) = 6 (1-7 starting on Sunday). If you’re extracting data from MySQL to load into SQL Server, the correct translation is ((WEEKDAY(date)+1)%7)+1.
To force IE to edge mode (even on intranet sites, where IE would otherwise use compatibility mode), the server needs to send X-UA-Compatible as an HTTP header. Using a meta element in the document head doesn’t work reliably. I found the answer buried in this Stack Overflow thread. In my case, I was working on… Continue reading How to Override IE’s Compatibility View Behavior On Intranet Sites
Working on a report from a MySQL database, I needed a table of all dates for the next year. With SQL Server (2005 and later) there’s a CTE/recursive method to do this pretty elegantly, but I couldn’t find anything similar for MySQL. All the solutions I found involved temporary tables, loops, and/or stored procedures–none of… Continue reading Generating a Range of Dates in MySQL