HeyMo0sh

Hamish is a Systems Management Specialist with a passion for efficient application deployment using DevOPs methodologies. He has 19 years IT experience in managing large scale databases SQL Server technologies. He has been managing SQL Server since SQL Server 2000 and pragmatic architectural design is his main focus in his current job. Educating and helping others learn is a driver for Hamish and he is a PASS User Group Leader, International speaker and a repeat guest lecturer at a local university.

Blog Post

DevOps: It’s About the Team, Not Just the Tech

In November 2023 I did a session at PASS Summit and one of my sessions was voted https://passdatacommunitysummit.com/about/news/have-you-watched-some-of-the-most-popular-sessions-from-summit-2023/ That session was called DevOps is about Growing People rather than...

2024-03-27 (first published: )

191 reads

Blog Post

Goals for 2024

Way back in 2019 I set some goals…. well I wrote some goals and posted them here 2019 seems a lifetime ago…..that was the year I travelled 200,000 air...

2024-03-20

30 reads

Blogs

Securing Kubernetes With External Secrets Operator on AWS

By

Here’s a way to centralize management, rotate secrets conveniently without downtime, automate synchronization and...

Save Azure PostgreSQL Backup to Storage

By

This may or may not be helpful in the long term, but since I’m...

The Book of Redgate: What’s Great about Redgate?

By

“I’m sick of hearing about Red Gate.” The first article in the book has...

Read the latest Blogs

Forums

Dynamic T-SQL Script Parameterization Using Python

By omu

Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...

Widespread New Technology Adoption

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Widespread New Technology Adoption

Multiple Sequences

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Sequences

Visit the forum

Question of the Day

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 nms

Assume the dbo.MonthSales table exists. If I run this, what happens?

See possible answers