Nothing is more annoying than having to disconnect users one by one. With this script, you will be able to quickly disconnect them with a few keystrokes.
The third part of Steve Jones's series on having SQL Server automatically report information to a DBA.
It is not always possible to run a process on a set schedule. This article by Steve Jones looks at a technique for ensuring that your processes can run on whenever you need them to without any loss of data.
The third part of Steve Jones's series on programming and manipulating strings in T-SQL dealing with REPLACE.
The fourth part of Steve Jones's series on programming and manipulating strings in T-SQL dealing with numeric conversions.
This may or may not be helpful in the long term, but since I’m...
By Steve Jones
“I’m sick of hearing about Red Gate.” The first article in the book has...
By Kevin3NF
IT leaders have a lot on their plates! Budgets, staffing, security, uptime, and keeping...
Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...
Comments posted to this topic are about the item Widespread New Technology Adoption
Comments posted to this topic are about the item Multiple Sequences
In SQL Server 2022, I run this code:
CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GO CREATE TABLE NewMonthSales (SaleID INT , SecondID int , saleyear INT , salemonth TINYINT , currSales NUMERIC(10, 2)); GO INSERT dbo.NewMonthSales (SaleID, SecondID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO SELECT * FROM dbo.NewMonthSales AS nmsAssume the dbo.MonthSales table exists. If I run this, what happens? See possible answers