Tag Archives: T-SQL

T-SQL Tuesday #187–Solving Problems

This month we have a great invite from Joe Fleming, a first time host of T-SQL Tuesday. Joe reached out when I requested some hosts and I’m glad he did. He’s got a great challenge for people and I’ll answer … Continue reading

Posted in Blog | Tagged , , | Comments Off on T-SQL Tuesday #187–Solving Problems

A Basic Update Trigger: #SQLNewBlogger

I had someone ask me about using triggers to detect changes in their tables. As I explained a few things, I thought this would make a nice series, so I’ve written a few posts on triggers that can be useful. … Continue reading

Posted in Blog | Tagged , , | 6 Comments

Using AI to Test a SQL Query

Someone sent me this code. WITH p AS ( SELECT ID, ROW_NUMBER() OVER (ORDER BY ID ASC) AS RN FROM wp_posts WHERE post_parent = 94341; ) UPDATE p SET menu_order = RN That’s not great code. In fact, it won’t … Continue reading

Posted in Blog | Tagged , , , | 1 Comment

Create a Linked Server: #SQLNewBlogger

I had a customer recently that was asking about Linked Servers and some development advice. I was going to show them a few things and realized I hadn’t created a linked server in my demo environment, so I did it … Continue reading

Posted in Blog | Tagged , , , | Comments Off on Create a Linked Server: #SQLNewBlogger