T-SQL Tuesday 170 write up: learning from abandoned projects

When I thought of this subject last year, I was really on the fence if it would work or not. Part of me was convinced it would elicit some response from the community, part of me was convinced people would be looking for a 'happy' start of the year and might not want to think … Continue reading T-SQL Tuesday 170 write up: learning from abandoned projects

SQL Server Common Table Expressions, a tale.

Or, how SQL Server behaved differently than I expected but managed to process quite a lot of rows before giving up. Let's begin We have a customer that would like to see the actual value of their stock in a table. They buy their stock at different times and at different prices. Calculating the stock … Continue reading SQL Server Common Table Expressions, a tale.

Fun ROWNUM() case, get n’th row from dataset.

Last week, one of my coworkers had a nice case. From a dataset, he needed the third row based on an indicator and a timestamp. That sounded a bit vague so I started out with creating a table that contained some records with the columns he'd have to filter on. CREATE TABLE dbo.demo ( id … Continue reading Fun ROWNUM() case, get n’th row from dataset.

Splitting strings

Splittings string with @SQLServer. #Microsoft #sqlserver #tsql #zekerweten