Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
4k views

I have a column data consisting of {"name":["John","Peter"],id:["20","30"]} If I do SELECT JSON_VALUE(data,'$.name[0]') from table it returns John ...
CutePoison's user avatar
  • 5,544
30 votes
8 answers
20k views

Getting an error below when restoring a AdventureWorks2017 database within a docker container. Running SQL Server 2019 CTP 2.0 (mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu) Both backup and ...
Daniel N's user avatar
  • 1,218
7 votes
2 answers
5k views

here's my sample code drop function rowcount_test go CREATE FUNCTION dbo.rowcount_test () RETURNS INT AS BEGIN DECLARE @v INT SELECT @v = 1 return @@ROWCOUNT END GO grant exec on dbo....
pelod's user avatar
  • 73
7 votes
2 answers
6k views

With SQL Server Express LocalDb 2012 (Microsoft MSI download) it was possible to do an unattended install from a command line: msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES This ...
msporek's user avatar
  • 1,215
4 votes
1 answer
593 views

Here is my code: DECLARE @info NVARCHAR(MAX) = '{"searchQuery":{"reportType":"ReportedHcEcg"},"pageQuery":{"pageNumber":1,"pageSize":10,"sortColumnName":"Urgent, UploaDateTime","sortOrder":"Desc"}}' ...
Maulik Modi's user avatar
  • 1,326
0 votes
0 answers
370 views

I am relatively new to Powershell, and I got a script to use to restore database in SQL Server 2019. I was running this bottom Powershell script on my new VM, and got bottom error message. This is ...
Java's user avatar
  • 1,324
7 votes
1 answer
1k views

According to this link, SQL Server machine learning service's highest R version is 3.3. Does anyone know when one can upgrade to version 3.5 or later? Or is my only option to switch to sql server ...
cs0815's user avatar
  • 17.6k
3 votes
2 answers
4k views

Good morning, My first question is how to determine if tables created in MS SQL Server are memory optimized. I have some tables and I don't remember if some of them I created in-memory optimized or ...
Piotr Wojcik's user avatar
2 votes
2 answers
103 views

Following is the given JSON data: DECLARE @Jdata NVARCHAR(MAX) = '{ "EmployeeDetails": { "BusinessEntityID": 3, "NationalIDNumber": 509647174, "...
MAK's user avatar
  • 7,345
1 vote
1 answer
532 views

I do voluntary work at an animal shelter. We have an application which uses a SQL Server 2019 database. I have created a view that includes a varbinary(max) column. The value in this column is a ...
MarcoC's user avatar
  • 21
1 vote
1 answer
286 views

I want to generate some sample data with random values. I have a mini table with 5 rows, ids from 1 to 5 with some text for every row. Then I want to generate 65536 rows - first column has value 1 for ...
ondrap's user avatar
  • 31
1 vote
2 answers
20k views

I am trying to install SQL Server 2019 in Windows 11. I am getting the following error for database engine and SQL Server Replication: Detailed results: Feature: Database ...
Dikesh Kumar's user avatar
0 votes
1 answer
4k views

I have the below Json string. I need to write a query to get the TP records. Without providing the index value, we need get the result. { "S": [ { "Name": "Project1", "SP": [ ...
Ashok Yaganti's user avatar
0 votes
1 answer
281 views

I have a windows sql user that is assigned db_datawriter role on a db. Presently the user can connect to the database via management studio and make changes to the data in the database. Also, he can ...
variable's user avatar
  • 9,886
0 votes
4 answers
587 views

I have a table in SQL Server with two columns as shown here, all number are comma-separated: IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL DROP TABLE #TempTable CREATE TABLE #TempTable ( ...
PyBoss's user avatar
  • 631
0 votes
0 answers
69 views

If I don't want to treat an empty string and NULL as being the same value, is there a cleaner way to write the following: -- @name and SomeTable.Name are varchar(10) NULL update SomeTable set Name = @...
Developer Webs's user avatar
0 votes
1 answer
303 views

I have written one stored procedure where I have added UNION like this: SELECT *,SysStartTime, SysEndTime FROM dbo.FirstTable WHERE Id = @Id UNION SELECT * FROM history.FirstTable WHERE Id = @Id ...
Shardul's user avatar
  • 369
0 votes
3 answers
7k views

Within the Job History logs - Error on Step 1 : Culture is not supported. Parameter name: culture 3072 (0x0c00) is an invalid culture identifier. Prior to this issue, I changed the server (MS SQL ...
Peter O Brien's user avatar
0 votes
1 answer
492 views

I have a SQL Server 2019 database (a big one). This database has about 3000 columns and about 200 tables and for each table we have at least 3 stored procedures. Anyway we have some columns in this ...
Iman Estiri's user avatar
0 votes
2 answers
2k views

Say I have a table Schema.table with these columns id | json_col on the forms e.g id=1 json_col ={"names":["John","Peter"],"ages":["31","40"...
CutePoison's user avatar
  • 5,544
-1 votes
1 answer
3k views

Yesterday suddenly a report occurred that someone was not able to get some data anymore because the issue Msg 2628, Level 16, State 1, Line 57 String or binary data would be truncated in table 'tempdb....
marcocram's user avatar