Spoofing Data Convincingly: Text Data
Learn how to generate some convincing data for your development databases.
2021-01-05
2,851 reads
Learn how to generate some convincing data for your development databases.
2021-01-05
2,851 reads
How to use reverse regex expressions in SQL Data Generator to fill a text column in SQL Server with fake, but very realistic complaints.
2020-01-16
Learn how you can easily generate large amounts of test data efficiently in this new series from Jeff Moden. Part 1 covers integers and floating point values.
2012-03-26
11,234 reads
Want to really level up your SQL game? I mean, go from good to great? This March...
By Steve Jones
We published an article recently at SQL Server Central on Tally Tables in Fabric...
By James Serra
In today’s data-driven world, organizations need the ability to analyze and act on data...
Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...
The state-of-the-art FARE Labs Environmental Testing Laboratory provides a comprehensive variety of testing services...
I'm running some restoration activity as part of a rehearsal to prepare for an...
I created a new sequence in SQL Server 2022 with this code.
CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GOI want to use this to insert some data from another table into a new table with this sequence. Which of these queries shows the way to do this efficiently?
-- 1 INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO -- 2 INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms, myseqtest; GO --3 DECLARE mycurs CURSOR FOR SELECT ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms DECLARE @yr INT, @mn INT, @sales NUMERIC(10,2) FETCH NEXT FROM mycurs INTO @yr, @mn, @sales WHILE @@FETCH_STATUS = 0 BEGIN INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , @yr , @mn , @sales FETCH NEXT FROM mycurs INTO @yr, @mn, @sales ENDSee possible answers