EN VI
Posts (0)
Questions (5)
2024-03-10 22:30:04
Like this declare @sql nvarchar(max) = 'select * from sys.objects' declare @forJsonSql nvarchar(max) = concat('select @json = (',@sql, ' for json auto)') --print @forJsonSql declare @json nvarchar(...
Tags: sql-server t-sql
2024-03-10 22:30:05
You can't use arbitrary statements in the THEN part of a MERGE, the syntax is quite specific about what you are allowed to do. If you want to THROW on such rows then just use a IF EXISTS... WHERE NOT...
Tags: sql sql-server t-sql
2024-03-11 05:00:08
You can retrieve a whole JSON object or array in the OPENJSON WITH schema, by using nvarchar(max) AS JSON. Then you can CROSS APPLY OPENJSON feeding that JSON into the next call, and so on. Do note th...
Tags: arrays json sql-server
2024-03-12 22:00:11
Perhaps these FILLFACTORs have been automatically generated by the SQL server. Perhaps. And if so, there's no need to version them. You version enough to recreate the project entirely from the repos...
Tags: sql-server git t-sql
2024-03-15 08:30:05
Is my thing a regular way of doing these dynamic operations? Yes, this is the recommended way. This type of query is called a Kitchen Sink Query, and your solution is actually a very good one. The i...
Tags: sql sql-server t-sql

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login