Category "sql-server"

CONCAT_WS() for SQL Server

How can I emulate MySQL's CONCAT_WS() function in SQL Server? This function is similar to CONCAT() function in SQL Server 2012 except that it adds a separator

Error when connecting to MSSQL Server with Google Apps Script via JDBC

I'm trying to connect to Microsoft SQL Server using Google Apps Script. I'm using SQL Server 2008 R2 and I am using one of the suggested scripts that's supposed

Finding blocking/locking queries in MS SQL (mssql)

Using sys.dm_os_wait_stats I have identified what I believe is a locking problem wait type waittime pct running ptc LCK_M_RS_S 2238.54 22.14

SQL Server Maximum rows that can be inserted in a single insert statment

I want to do a batch insert, similar to this question How to do a batch insert in MySQL What is the limitation is SQL Server on how many rows can be inserted

How to read geography values using hibernate?

In my spring boot application, I am trying to store spatial data using spring data with hibernate (jpa). Full source code of minimal reproducing example is avai

SSIS loading data error

I have a CSV file which contains this data: EmployeeCode,EmployeeName,EmployeeSalary,Date 101,raju,1000,2/2/2003 102,krish,100,3/4/2005 103,rishbh,320,12/9/200

How to convert XML columns to rows in SQL database?

I am trying to import an XML invoice to SQL database. After some research, I have managed to put it in SQL database but it has x rows whereas it should be a sin

Check the perm 'Create Database' in PostgreSQL as well as in SQL Server

I would like to check the perm in PostgreSQL db as well as I do it via this command 'SELECT HAS_PERMS_BY_NAME(NULL, 'DATABASE', 'CREATE DATABASE')' for the SQL

PAUSED SQL Server still uses 20% CPU

SQL Server is always using 15% to 40% or more on a very lightly used database (maybe 40 users log in ONCE a day for literally a min or two). A small load proced

How to connect SQL Server with Rstudio?

I have downloaded Microsoft SQL Server on my Mac with the Docker image as described here, and also I have downloaded the database AdventureWorks2019 as an exam

Sql Server query varchar data sort like int

I have one table like CREATE TABLE table_name ( P_Id int, amount varchar(50) ) Data Like Id amount ---------- 1 2340 2 4568 3 10000 Now I want to sort t

Query to get only numbers from a string

I have data like this: string 1: 003Preliminary Examination Plan string 2: Coordination005 string 3: Balance1000sheet The output I expect is string 1:

Login failed when querying linked server

I am trying to create a linked server in SQL Server: --Create the link to server "uranium" EXEC master.dbo.sp_addlinkedserver @server = N'uranium',

Login failed when querying linked server

I am trying to create a linked server in SQL Server: --Create the link to server "uranium" EXEC master.dbo.sp_addlinkedserver @server = N'uranium',

Login failed when querying linked server

I am trying to create a linked server in SQL Server: --Create the link to server "uranium" EXEC master.dbo.sp_addlinkedserver @server = N'uranium',

Login failed when querying linked server

I am trying to create a linked server in SQL Server: --Create the link to server "uranium" EXEC master.dbo.sp_addlinkedserver @server = N'uranium',

Getting maximum value of float in SQL programmatically

Is there an method for programmatically (in T-SQL) retrieving the maximum (and minimum) value of a datatype? That it would act like float.MaxValue in C#. I wou

Getting maximum value of float in SQL programmatically

Is there an method for programmatically (in T-SQL) retrieving the maximum (and minimum) value of a datatype? That it would act like float.MaxValue in C#. I wou

Getting maximum value of float in SQL programmatically

Is there an method for programmatically (in T-SQL) retrieving the maximum (and minimum) value of a datatype? That it would act like float.MaxValue in C#. I wou

Getting maximum value of float in SQL programmatically

Is there an method for programmatically (in T-SQL) retrieving the maximum (and minimum) value of a datatype? That it would act like float.MaxValue in C#. I wou