Archives by Month: November 2008

T-SQL function to get a char count

11/18/2008

I needed an efficient and reusable way to get character counts in strings at the database level and produced the following udf which takes a string and a character and returns the number of occurrences of the character in the string.

Read more...


Posted by Kevin J. Miller in:SQL Server

CF-style List functions in SQL Server

11/11/2008

The built-in string handling functions in t-sql are all well and good, but there really aren't any graceful ways of handling lists.  As any CF developer that's been around a while knows, lists are pretty commonplace in practice, and there are times when it makes more sense (or you're required) to do list handling at the db level rather than at the front end.

The following three SQL Server udf's provide equivalent functionality to the ColdFusion list functions listfirst, listgetat, and listlast.

Read more...


Posted by Kevin J. Miller in:SQL Server

DBX 10.1.7 Released

11/11/2008

Changes in this version:

- added explicit identification of SQL2008 (would previously fail with 'unsupported version')
- fixed stylesheet references when printing tabs

While I don't have an available SQL2008 instance to test against, to the best of my knowledge all of the SQL2005-specific routines in DBX should work fine in SQL2008.  If anyone experiences issues with SQL2008, file a bug report at riaforge and I may just have to suck it up and create an instance somewhere (I'm reticent to create a SQL2008 instance on one of my dev boxes as we are homogeneously SQL2005, and its probable there would be some kind of an impact on the integrity of an already installed instance of 2005 - guessing).


Posted by Kevin J. Miller in:ColdFusionDBX