2023-10-02
505 reads
2023-10-02
505 reads
This article looks at Window functions and how they can be used to solve problems in a different way from standard aggregate functions.
2023-02-24
5,880 reads
2022-07-11
574 reads
2022-06-17
524 reads
2021-05-31
610 reads
2021-05-24
514 reads
2021-03-02
679 reads
2021-02-23
625 reads
2021-02-16
838 reads
2020-02-14
882 reads
Here’s a way to centralize management, rotate secrets conveniently without downtime, automate synchronization and...
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...
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