Comment

Bosses

I saw this in a tweet and it really resonated with me.

The bosses we remember:

  1. Provided safe space to grow
  2. Opened career doors
  3. Defended us when we needed it
  4. Recognised and rewarded us
  5. Developed us as leaders
  6. Inspired us to stretch higher
  7. Led by example
  8. Told us our work mattered
  9. Forgave us when we made mistakes

Comment

Notes to self on XML PATH and String concatenation in t-sql for SQL2005, 2008 and beyond

Here's the query to be able to select the table name and get a concatenated list of the fields back. Very useful for generating queries on the fly.

SELECT
 t.table_name,
 STUFF((SELECT
             ', ' + column_name
FROM INFORMATION_SCHEMA.COLUMNS c where c.table_name = t.table_name
FOR XML PATH('')
), 1, 1, ''
) As concatenated_string
FROM INFORMATION_SCHEMA.TABLES t
WHERE table_name ='name_of_table'

I know it's not my usual type of post, but I keep forgetting the syntax and looking it up, so I put it where I 'll find it. :)