Tag Archives: T-SQL

Knowing String Defaults in T-SQL–#SQLNewBlogger

For years I’ve assumed I knew the string defaults, but I realized that’s not right. This post looks at what I learned. Another post for me that is simple and hopefully serves as an example for people trying to get … Continue reading

Posted in Blog | Tagged , , | Comments Off on Knowing String Defaults in T-SQL–#SQLNewBlogger

Using the T-SQL Error Functions–#SQLNewBlogger

I was working with a customer that was doing some error handling in procs and helped them do some error tracking. As we were working through things, I realized that some of functions working with errors operated differently than I … Continue reading

Posted in Blog | Tagged , , | 3 Comments

Using DATETRUNC–#SQLNewBlogger

I saw someone using DATETRUNC recently in some code and realized I hadn’t really looked at this function before. It’s one that was added in SQL Server 2022, though it’s been in other platforms for years. This post looks at … Continue reading

Posted in Blog | Tagged , , | Comments Off on Using DATETRUNC–#SQLNewBlogger

Changing the Data Type of a Primary Key–#SQLNewBlogger

A client asked this question recently: How do I change my numeric PK to a character type? I decided to write a short blog on how to do this. This is the happy path, and not intended to cover all … Continue reading

Posted in Blog | Tagged , , | 2 Comments