My team mate Pi asked me today: how do you create a byte with the value 00000001 in SQL Server? The answer is to create an integer representation of the byte’s value, and cast it to binary. SELECT CAST(CAST(1 AS TINYINT) AS BINARY(1)) The output in Management Studio is: 0x01 (Management Studio outputs binary fields […]
You are browsing archives for
Month: May 2007
Hey Yo! SQLCMD may truncate your XML!
While trying to use SQLCMD to produce an app.config file, I encountered problems with the output being truncated. The script was similar to: DECLARE @appconfig XML SET @appconfig = ‘<configuration></configuration>’ … Insert configuration nodes — Output the config SELECT @appconfig as ApplicationConfiguration The default options for SQLCMD produced output like: ApplicationConfiguration ————————- <configuration><connecti (the value […]
Working Remotely: Disable Effects for a Better Working Experience
Working from home using a remote desktop has turned out to be surprisingly responsive. There’s little to no lag, and I can still do most things (except use some windows shortcuts). My current gripe is that Menus take a while to display because of fancy fade-ins and smooth expansion. It all looks nice when you […]
Julian!? Where are you?
Well I’ve definitely been "missing" on my blog lately. Between work commitments, a long daily commute, and personal projects, I’ve had no time to post much content on my website. As of last week, I started working some days remotely; from home. Its been quiet a good change, and now that I have less distractions: […]