Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: October 2008

SQL Server Messages: fairies rearranging furniture.

SQL Server and Sybase are geared up to send information to applications over two distinct channels, the results in one channel that we all know and use that is dedicated to the processing of result sets, and both messages and errors in the other..

Messages were once used a lot… Read more

0 comments, 282 reads

Posted in Phil Factor's Phrenetic Phoughts: The SQL on 20 October 2008

Validating text data. A few techniques.

/*datafile used in the SQL  */

DECLARE @String VARCHAR(MAX)
SELECT  @String = 'When you are starting out to validate text input, perhaps to clean up a database, you will, at some point need to get down to the character level. Doing a simple character frequency of…

Read more

1 comments, 478 reads

Posted in Phil Factor's Phrenetic Phoughts: The SQL on 9 October 2008

Rendering code nicely in blogs and forums.

 I wrote the prettifier specifically to help with posting SQL into blogs and forums. You can find it here http://extras.sqlservercentral.com/prettifier/prettifier.aspx Actually, it is just a stored procedure that does all the work. The website has very little progamming logic in it. (I haven't had a moment to update the prettifier… Read more

3 comments, 518 reads

Posted in Phil Factor's Phrenetic Phoughts: The SQL on 7 October 2008

Un-concatenating row values


/* Anith Sen's achievement, in his article 'Concatenating Row Values in Transact-SQL' has been to list and illustrate the many ways of producing a 'grouping' or concatenation of row values so that the result of this... */
SELECT CategoryId, ProductName FROM Northwind..Products
/*
...can be 'grouped', in a far…

Read more

0 comments, 518 reads

Posted in Phil Factor's Phrenetic Phoughts: The SQL on 6 October 2008

Never say 'never' to the WHILE loop.

/* download the test text file Moby-Dyck.zip here */

/* You might notice that I refer to Moby **** in this blog. This is because the busybodyish nanny software cannot allow me to refer to my test data, the 1851 novel by Herman Melville. This reminds me of when the Royal Society… Read more

16 comments, 803 reads

Posted in Phil Factor's Phrenetic Phoughts: The SQL on 2 October 2008