From the course: Querying Microsoft SQL Server 2022
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Create a series of values - SQL Server Tutorial
From the course: Querying Microsoft SQL Server 2022
Create a series of values
- [Instructor] There is one more function that's brand new in SQL Server 2022 that I want to share with you. This is something that a lot of database professionals have been asking for for a very long time and that's the ability to generate a series of numbers. It may not seem like a big deal but previous solutions to get to this type of generated list has always been a hassle and it required a cumbersome set of functions and workarounds so it's really nice to bring that capability into a native function that's accessible to everyone. There is one catch though. In order to use this function, the database itself needs to be at a compatibility level of 160. This corresponds to the new SQL Server 2022 compatibility level. So if you have an older database, even if it's on a SQL Server 2022 server, it may not have been brought forward to fully support the current set of features. I've got the Generate series Start SQL file…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Use functions in T-SQL3m 10s
-
(Locked)
String functions3m 44s
-
(Locked)
Text concatenation3m 40s
-
(Locked)
Round with mathematical functions3m 13s
-
(Locked)
Find the GREATEST or LEAST value5m 5s
-
(Locked)
Work with date functions5m 56s
-
(Locked)
FORMAT date and times3m 36s
-
(Locked)
Group dates into buckets6m 10s
-
(Locked)
Return random records with NEWID2m 22s
-
(Locked)
Create a series of values5m 13s
-
(Locked)
The IIF logical function3m 39s
-
(Locked)
Write a CASE statement4m 34s
-
(Locked)
Challenge: Use functions in a SQL query49s
-
(Locked)
Solution: Use functions in a SQL query13m 55s
-
(Locked)
Solution: Use functions in a query4m 22s
-
-
-
-
-
-