Tag Archives: T-SQL

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

Can I Change a Primary Key Value? #SQLNewBlogger

I heard someone say recently that you can’t change a primary key value in a row. That’s not the case, so I decided to show a quick proof of that. Another post for me that is simple and hopefully serves … Continue reading

Posted in Blog | Tagged , , | 1 Comment

Limiting Results with TEXTSIZE in SQL Server: #SQLNewBlogger

There is a SET command in SQL Server that changes how much data is returned from some fields. This short post shows what I learned about the SET TEXTSIZE command. Another post for me that is simple and hopefully serves … Continue reading

Posted in Blog | Tagged , , | 4 Comments