Using Table Valued Parameters with sp_executesql
Recently I did a presentation on dynamic SQL. In the presentation I pointed out the similarity of using sp_executesql to...
2018-09-24 (first published: 2018-09-13)
3,839 reads
Recently I did a presentation on dynamic SQL. In the presentation I pointed out the similarity of using sp_executesql to...
2018-09-24 (first published: 2018-09-13)
3,839 reads
tl;dr; VIEW DEFINITION
Every now and again you’ll have a user that needs to be able to see what permissions other...
2018-09-17
340 reads
tl;dr; While the difference is very important 90% of the time you won’t care and should just add the two...
2018-09-13 (first published: 2018-09-05)
3,610 reads
Anything that happens in a trigger happens within the same transaction of the command that called it.
Part of me feels...
2018-09-11
213 reads
Last month Steve Jones (b/t) suggested that it might be helpful if those of us that work in the IT/database...
2018-09-06 (first published: 2018-08-22)
1,656 reads
In the very first SQL Homework post you were asked to take a backup. In fact it asked you to...
2018-09-03
804 reads
A few years back someone started the Advent of code. If you aren’t familiar with it, it’s an advent calendar...
2018-08-29
521 reads
Permissions are a common concern. One of the most frequent requests I get is I need X, Y and Z...
2018-08-29 (first published: 2018-08-16)
3,196 reads
I was reading a post today by Bert Wagner (b/t).
Displaying Long Variable Values in SQL Server
By the way, if...
2018-08-27
902 reads
Last Thursday I spoke at NTSSUG (North Texas SQL Server User Group). This is my local group (only 1.5 hours...
2018-08-20
218 reads
By Steve Jones
I went to sleep while reading a Kindle book on my phone. I know...
A conversation with Jan Laš, CIO at HOPI, about what deploying a data agent...
It's time for T-SQL Tuesday #198! This month's topic is change detection. The post T-SQL...
Jl. Pegangsaan Timur, Menteng Gedung Cikini Gold Center LGF/A/AKS032, RT.1/RW.1, Pegangsaan, Menteng, Central Jakarta...
Kem Tower, Gedung, Jl. Landas Pacu Barat No.Blok B Kav. 2, Daerah Khusus Ibukota...
Jl. Jend. Sudirman No.Kav.47, Karet Semanggi, Kecamatan Setiabudi, Kota Jakarta Selatan, Daerah Khusus Ibukota...
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT TOP 2
json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
See possible answers