Skip to main content

No I don’t want every day of my life in Google!

Ah, the sweet romance of a developer and an over excited search engine. How I long for my bandwidth back! If you stopped by in the last three days you would have recieved a ‘bandwidth usage limit exceeded’ message from my ISP. If you were me you’d think that odd seeing as there are so […]

Changing a Database File Logical Name

Applies to: SQL Server 2000, SQL Server 2005 (Yukon) It’s pretty often I see the need for a database to be renames. Sometimes its because a developer has given their database a very generic name, or sometimes becuase the use of the database has shifted. Renaming a database is a pretty easy task (make sure […]

Snippet: Select a Date or Current Date Without Time

Often you’ll want to compare datetime values based on the date only, ignoring the time. This is especially important when doing date ranges, where thinking like a human you might want ‘Select Accounts Join Offers Where SignupDate between 1st Jan and 31st Jan’. As a human we’re probably thinking ‘inclusive’. As a computer, SQL Server […]

Snippet: Show full column names and data types for all user tables in a database

SELECT QUOTENAME( sysobjects.name ) + ‘.’ + QUOTENAME( USER_NAME( sysobjects.uid ) ) + ‘.’ + QUOTENAME( syscolumns.name ) AS [Name] , TYPE_NAME( syscolumns.xusertype ) AS [Type] , syscolumns.prec AS [Precision] , syscolumns.scale AS [Scale] FROM syscolumnsINNER JOIN sysobjects ON syscolumns.id = sysobjects.idLEFT OUTER JOIN systypes ON systypes.xtype = syscolumns.xtypeWHERE sysobjects.xtype = ‘U’

Multiple domain names, one geeklog

Geeklog (the software driving this site) requires you to set the home url in config.php. I use multiple domain names here: juliankuiters.id.au julian-kuiters.id.au synthesisone.com so I wanted to configure geeklog to allow visitors to use the website through each of these domans. Geeklogs default behaviour is to prefix the value of $_CONF[‘site_url’] from config.php to […]

Column Confusion

– Don’t start column names with FK_ – Always name a FK column the same as the PK I happened to glance a database model today that had a column naming scheme that scared me: column names that started with FK_. I’m pretty sure the designer was intending to show that the column was actually […]

About time!

A long time coming, but finally I’ve gotten round to installing something I can post to from work and home without hassle. Ugly, yes I know. (Where’s the pink?) A new theme will come soon enough. Until I feel creative, you’ll have to put up with articles, snippets and the occasional frustrated punishing post. Till […]