Tag Archives: T-SQL
-
SQL Homework – September 2022 – Query window challenge
Leave a commentSeptember 1, 2022 by Kenneth Fisher
I had every intention of doing Replication Part 2 this month but had a thought I liked better. I will …
Continue reading -
How do I tell if identity_insert is turned on and if so what table?
4June 24, 2022 by Kenneth Fisher
TLDR; The code to do this is below but it’s a bit hokey and probably isn’t worth it. It’s pretty …
Continue reading -
Running dynamic SQL in a different database
10May 19, 2022 by Kenneth Fisher
This is one of those things that on hindsight was a stupid problem, but still cost me hours and a …
Continue reading -
How can I use the identity column, without knowing identity column’s name.
Leave a commentMay 12, 2022 by Kenneth Fisher
One of the most fun parts of blogging is when you learn something completely unexpected while writing a blog. The …
Continue reading -
Scripting with a temp stored procedure
2March 17, 2022 by Kenneth Fisher
A few years back I learned about temporary stored procedures from a Kendra Little (blog|twitter) blog post. At the time …
Continue reading -
Shift calculations (or same time every day)
2March 15, 2022 by Kenneth Fisher
One of the more interesting jobs I’ve had over the years was for a company that created emergency room software. …
Continue reading -
SQL Homework – March 2022 – Formatting
Leave a commentMarch 1, 2022 by Kenneth Fisher
Please write the following on the chalk board 100 times. Queries should be readable!Queries should be readable!Queries should be readable!Queries …
Continue reading -
You can’t use GO in dynamic SQL.
2February 10, 2022 by Kenneth Fisher
This is one of those things that when I look back on it seems really obvious. Note: If at the …
Continue reading -
Commenting a branching IF-THEN-ELSE.
1October 19, 2021 by Kenneth Fisher
I’m a big fan of comments (MSSQL, Powershell), so along those lines here’s an interesting way to comment an IF-THEN-ELSE …
Continue reading -
Code examples : T-SQL Tuesday #143
Leave a commentOctober 12, 2021 by Kenneth Fisher
It’s TSQL Tuesday! John Armando McCormack (blog|twitter) is our host this month and he’d like us to share some of …
Continue reading