T-SQL function to get word count

Similar in approach to the previous uf_charCount function, the following function returns the number of words in a string, assuming a space token as word separator. CREATE FUNCTION [dbo].[uf_wordCount] (@string varchar(8000)) RETURNS SMALLINT /* Purpose: returns the...

DBX 10.1.8 Released

Minor update in this version: when launching the SQL*Exec window from the table or view detail page, the populated sql now has the columns [bracketed] (by request) increased the default size of the textarea in the SQLExec window since although its actually sizable by...

DBX 10.1.7 Released

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...

CF-style List functions in SQL Server

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.

DBX 10.1.6 Released

Nathan Strutz pointed out a bug where DBX would not run from a site running on a port other than 80. This stemmed from a cross-site scripting fix added in v10.1.3 which did not consider the port. This has been resolved. Other changes in this version: – added...

DBX 10.1.5 Released

I didn’t post for the 10.1.4 release, so here are the changes for that: 10.1.4: – More complete table DDL output – fixed bugs in table DDL In the 10.1.5 version, a Data Sample tab was added for tables and views which simply outputs the TOP X rows for...