sql-server-2016 Questions
5
Solved
I get the following error on secondary replicas when trying to restore an encrypted backup even though the replica has the master key (dmk), service master key, certificates and private keys restor...
Lucic asked 22/9, 2017 at 21:52
3
Solved
I have a query that when run, it's result is instant.
However, I paste the exact same query into VIEW, and the results take 6 seconds to reply.
For example,
SELECT ... FROM MyTables WHERE Perso...
Gentes asked 14/12, 2016 at 0:39
2
Solved
I'm trying to figure out why the BULK INSERT command I'm using isn't recognizing the FORMAT and FIELDQUOTE options used in the command.
BULK INSERT dbo.tblM2016_RAW_Current_Import_File
FROM '\\x\...
Choirmaster asked 13/2, 2017 at 14:58
6
I'm unable to add a database on a developer machine.
I'm running win 10, visual studio 2015.
I re-installed SQL server 2016 twice, last time with firewall disabled it all gave green marks in the en...
Guimar asked 13/10, 2016 at 13:43
2
Me and a friend are working on an ASP.NET Core project as teammate and sharing data using github, every time who pull changes from github, should delete the Migration folder
in order to add migrati...
Faucet asked 28/12, 2021 at 20:21
5
Solved
I have a SQL column that has a single JSON array:
{"names":["Joe","Fred","Sue"]}
Given a search string, how can I use SQL to search for a match in the name...
Tripletail asked 11/11, 2017 at 14:54
3
Solved
I've downloaded and installed SQL Server 2016. When I attempted to use the STRING_AGG function I receive this error. Here is my code:
SELECT STRING_AGG(cast(FieldNumber AS VARCHAR(100)), ',')
FROM...
Agustinaah asked 2/12, 2016 at 1:0
7
I'm using SQL Server 2016, which supports JSON PATH to return JSON string.
I wonder how to get just a simple empty json array, I mean [] when my query or sub-query returns null. I've tried this que...
Tepefy asked 19/9, 2016 at 6:12
4
Solved
I have a JSON structure where there are Sections, consisting of multiple Renders, which consist of multiple Fields.
How do I do 1 OPENJSON call on the lowest level (Fields) to get all information ...
Barrage asked 7/11, 2016 at 23:10
3
Solved
I have a table that has system versioning (temporal table), but I can not see a design environment visually. I do it because I can see the SYSTEM_VERSIONING clause has been used. I would like to ha...
Sandeesandeep asked 4/5, 2017 at 10:28
8
Solved
On a SQL 2016 Server I have a job that calls an SSIS package. That package is in a project in the SSISDB and has parameters. One of those parameters is a string type that is blank as a default.
I ...
Gaberlunzie asked 5/12, 2017 at 20:56
3
Solved
I am working with JSON in SSMS in SQL Server 2016. Is there any way to get around that the results of a FOR JSON statement are presented as an XML column?
Are there any settings changes, additiona...
Hinshaw asked 19/10, 2018 at 19:56
2
Solved
With SQL Server 2016 when I run this:
SELECT *
FROM sys.indexes
WHERE name = 'idx_Parts_PartNum'
There is one result. As expected. But when on the same DB I run:
exec sp_rename N'idx_Parts_Part...
Disclose asked 3/12, 2020 at 16:17
8
Solved
I am trying to parse out a value from a string that involves getting the last index of a string. Currently, I am doing a horrible hack that involves reversing a string:
SELECT REVERSE(SUBSTRING(RE...
Ranket asked 17/8, 2016 at 16:38
3
Solved
I'd like to get JSON with an array of integers using SQL Server 2016's For JSON feature. I'm stumped on array of integers.
Database table structures:
declare @Employees table (ID int, Name nvarchar...
Pugilism asked 28/5, 2016 at 0:54
7
Solved
I think the answer is no but I'm looking to give someone access to a SQL Server database but I only really want them to have access to one table.
It's easy enough to limit someone to only access o...
Hydro asked 20/3, 2012 at 12:48
2
Solved
In SSMS when I do a
Find and Replace in Files
(default keystroke CTRL+SHIFT+H)
Edit > Find and Replace > Replace in Files
If I set the "Look In" to "Current Document" then do a change an...
Heron asked 24/5, 2017 at 16:43
1
How would one use the MSSQL 2016 AT TIMEZONE feature from Entity Framework?
In other words, how to generate
SELECT MyTimestamp AT TIME ZONE 'Central European Standard Time' FROM MyTable
by LINQ...
Reinhold asked 24/11, 2016 at 13:42
1
Solved
I have the example code below. Do I still need a cursor commit after the last line? I am running against a SQL server 2016 DB host if that matters.
import pyodbc
cnxn = pyodbc.connect('Driver=SQL S...
Devaughn asked 16/12, 2021 at 0:58
3
Solved
I want to create a view if not exists in SQL Server 2016
IF EXISTS(SELECT 1 FROM sys.views
WHERE Name = 'VI_ALL_CITIES_AS_CATEGORY')
BEGIN
CREATE VIEW VI_ALL_CITIES_AS_CATEGORY AS
SELECT PERSON...
Valladolid asked 7/3, 2018 at 9:23
2
Solved
I installed SQL Server 2016 Dev with all items and options (included Client SDK).
But Microsoft.SqlServer.ManagedDTS.dll is missing.
Where can I find the dll to reference this dll in a VB project...
Zenobia asked 26/6, 2017 at 21:36
3
Solved
Using PostgreSQL I can have multiple rows of json objects.
select (select ROW_TO_JSON(_) from (select c.name, c.age) as _) as jsonresult from employee as c
This gives me this result:
{"age":65,...
Manton asked 24/4, 2017 at 11:51
4
Solved
I have a nvarchar(1000) field in my table and I am storing JSON data in that column.
eg :
CONTENT_RULE_ID CONTENT_RULE
1 {"EntityType":"Inquiry", "Values":[1,2]}
2 {"EntityType":"Inquiry", "Va...
Costin asked 12/1, 2018 at 10:17
3
Solved
I can use temporal tables in SQL Server 2016. Entity Framework 6 unfortunately does not know this feature yet. Is there the possibility of a workaround to use the new querying options (see msdn) wi...
Sesterce asked 6/1, 2017 at 21:27
7
I am new to JSON in SQL Server and can't figure out how to return a simple array of strings:
DECLARE @T TABLE ([value] NVARCHAR(MAX))
INSERT INTO @T ([value]) VALUES ('foo')
INSERT INTO @T ([value...
Jolin asked 12/9, 2016 at 14:50
© 2022 - 2024 — McMap. All rights reserved.