sql-server-2016 Questions

3

I am getting this error when i try to drop a memory optimized table. i am using a sql server 2016 sp1 Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported with m...
Semiyearly asked 15/2, 2017 at 21:47

15

Solved

I'm currently updating all of our ETLs using Visual Studio 2015 (made in BIDS 2008) and redeploying them to a new reporting server running on SQL Server 2016 (originally 2008R2). While updating on...
Thickening asked 29/12, 2016 at 21:49

6

Solved

I have an Asset table and an Attributes table, where the attributes are simple key/value pairs. DECLARE @Asset TABLE(AssetID INT) INSERT @Asset VALUES (1) DECLARE @Att TABLE (AssetID INT, Name NV...
Lightyear asked 28/1, 2017 at 15:38

4

Solved

How can I read value from json file in that field name contains space using OPENJSON in Sql Server 2016. See the below code: DECLARE @json NVARCHAR(MAX) SET @json = N'{ "full name" : "Jayesh Tank"...
Unerring asked 27/7, 2017 at 8:35

33

Solved

I need to add a specific column if it does not exist. I have something like the following, but it always returns false: IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'myT...

2

Is it possible to change the user account of the localdb instance in SQL Server? We changed our domain and it is using my old domain account so I can no longer login anymore. Also, I don't believe ...
Scales asked 28/11, 2016 at 19:23

4

Solved

I created and executed a dtsx with SSMS corresponding wizard: This was to import a flat file in an existing table. At the end I saved the "package" as a .dtsx file Now I need to modify the colu...
Ternopol asked 22/1, 2019 at 11:25

4

Solved

I'm new to SSRS and I'm not sure if it will do what I would like to do. I'm getting the following error in SSRS: "The Value expression for the text box 'Textbox17' refers to the field 'DayCnt'...
Shopwindow asked 12/7, 2017 at 12:10

7

Solved

I need to replace multiple characters in a string. The result can't contain any '&' or any commas. I currently have: REPLACE(T2.[ShipToCode],'&','and') Which converts & to and, but how...
Magnetron asked 30/8, 2016 at 15:5

3

Solved

Recently I played around with the new for json auto feature of the Azure SQL database. When I select a lot of records for example with this query: Select Wiki.WikiId , Wiki.WikiText , Wiki.Tit...
Gulledge asked 9/8, 2017 at 16:8

8

Solved

I'd like to select everything AFTER a certain character (-) that is placed on the most right side. Eg. abcd-efgh-XXXX And I'd like to select the XXXX part Thanks!
Noguchi asked 16/8, 2016 at 11:34

2

Solved

I have the following JSON data : set @json = N'{ "Book":{ "IssueDate":"02-15-2019" , "Detail":{ "Type":"Any Type" , "Author":{ "Name":"Annie" , "Sex":"Female" } } , "Chapter":[ { "Sect...
Greig asked 15/2, 2019 at 7:1

3

I've just started using Query data store in SQL server 2016, and its very useful indeed. I have a problem in that on the server there are a number of services that are monitoring service broker qu...
Soapbark asked 1/12, 2017 at 8:51

2

After enabling query store, how to find who executed the query. For example, in case of trace collection, there is TRC file which will get the hostname and program details for query and in case of ...

2

Solved

From my local computer I am using SQL Server 2016 Management Studio client (SSMS) to connect to a SQL Server installed on a remote computer. I connect using Windows Authentication method. My SQL S...
Annunciator asked 29/4, 2020 at 18:49

9

Solved

SQL 2016 has a new feature which converts data on SQL server to JSON. I am having difficulty in combining array of objects into array of values i.e., EXAMPLE - CREATE TABLE #temp (item_id VARCH...
Buffybuford asked 8/6, 2016 at 17:0

2

I want to use UTC timestamps exclusively in an MSSQL database. When writing the current timestamp I can use system methods like GETDATEUTC and we have agreed with suppliers that timestamps sent fro...
Misshape asked 12/1, 2022 at 15:43

9

I'm following this guide illustrating a code-first approach with Entity Framework core. Migrations were functioning correctly until, at some point, I deleted my .mdf file. Since then, executing Upd...
Stimulant asked 15/7, 2016 at 10:32

6

I'm currently updating all of our ETLs using Visual Studio 2015 (made in BIDS 2008) and redeploying them to a new reporting server running on SQL Server 2016 (originally 2008R2). While updating o...
Ashwin asked 29/12, 2016 at 21:0

4

We have a SQL Server 2016 database that employs Always Encrypted. Our recently published ASP.net web site attempts to pull data from this database, and when it does we get this error: Error: Fail...
Remonstrance asked 19/7, 2016 at 15:11

4

Solved

CREATE TABLE #A (UpperLimit NUMERIC(4)) CREATE TABLE #B (Id NUMERIC(4), Amount NUMERIC(4)) INSERT INTO #A VALUES (1000), (2000), (3000) INSERT INTO #B VALUES (1, 3100), (2, 1900), (3, 1800...
Oneal asked 26/1, 2023 at 10:24

5

Solved

I need to create a JSON output from a query that uses inner join between two tables with a one to many relationship. I would like the values of the secondary table to be nested as array properties ...
Hofmannsthal asked 14/12, 2017 at 13:11

3

Solved

When temporal table is created, we need to defined start and end date time columns which can be hidden - not visible in SELECT * or INSERT without columns. I want to add one more column, which wil...
Interlink asked 8/3, 2018 at 7:46

6

I read that there is a function equivalent to the standard function TRANSLATE under DB2 under SQL Server 2017. But how to do under earlier versions? For definition of function : here

3

Solved

I am new to JSON in SQL. I am getting the error "JSON text is not properly formatted. Unexpected character 'N' is found at position 0." while executing the below - DECLARE @json1 NVARCHAR(4000) se...
Concent asked 12/10, 2018 at 15:45

© 2022 - 2024 — McMap. All rights reserved.