This T-SQL code will show you how to reset an auto incremented column in SQL Server, specifically when you need to start from the next available number after removing large…
This T-SQL code snippet demonstrates how to reset an identity column's auto-increment value back to 1 in SQL Server. It should only be used when the table is empty, as…
Learn how to extract the day number from a date using T-SQL with this simple and effective code snippet. Get the day number for any given date in SQL Server.
This T-SQL code demonstrates how to output numbers as ordinal numbers using CASE statements in SQL Server. Learn how to replace a number with a field and format it correctly…
This T-SQL statement demonstrates how to output the day from a date in ordinal numbers using SQL Server. Learn how to replace `Getdate()` with your date field and format the…
This T-SQL code demonstrates how to convert line separated text in a SQL Server table into comma separated text using multiple nested REPLACE functions.