Tag Archives: SQLNewBlogger

DATEADD Truncates the Number Parameter: #SQLNewBlogger

This was an interesting thing I saw in a Question of the Day submission. I hadn’t thought about the issue, but apparently DATEADD truncates values rather than rounding them. I’m not sure why that is the case, but it is. … Continue reading

Posted in Blog | Tagged , , | 1 Comment

Declaring a Complex PK in a CREATE TABLE: #SQLNewBlogger

Recently I was talking with someone who had not named any of the primary keys (PKs) in their database. They used system generated names and when they ran comparisons, they got all sorts of drops and creates they didn’t expect. … Continue reading

Posted in Blog | Tagged , , | Comments Off on Declaring a Complex PK in a CREATE TABLE: #SQLNewBlogger

Creating a “Real” Copy of a View: #SQLNewBlogger

I saw a post where a developer was trying to read the Information Schema views to create a copy of a view as a “real” table, a user table. This posts shows an easy way to do this. Another post … Continue reading

Posted in Blog | Tagged , , | Comments Off on Creating a “Real” Copy of a View: #SQLNewBlogger

FIRST_VALUE vs. Min: #SQLNewBlogger

I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter asked about the difference between Min() and First_value. This post looks at a few cases. Another post for me that is simple and hopefully serves as … Continue reading

Posted in Blog | Tagged , , | Comments Off on FIRST_VALUE vs. Min: #SQLNewBlogger