Category "sql-server"

SQL Server : run a script on all databases

I have a SQL script with a function (function drops at the end of the script) and temporary table definitions and variables to process the data that gives me on

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

I want to establish a MSSQL Connection from Ubunutu 18.04. It was quite hard to get this set up, but know it works so far that I can use sql_srv class or pdo cl

Cannot connect to SQL Server except with domain admin account

I am running into an issue where my .net application (C#) will not connect to SQL Server when ran by a domain user. Exception is: The underlying provider faile

Find average and then use that value to calculate other values

I have a query with a few columns. I need to find the avg of a particular column and then use the average value to calculate other values. I am finding avg with

SqlException (0x80131904): Cannot open database "DBName" requested by the login

I have the following connection string in ASP.NET Core, but I get the following error: Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open dat

Data migration for .SQB files to Snowflake

I need to migrate .SQB files to Snowflake. I have a data relay where MSSQL Server database files are saved in .SQB format (Redgate) and available via sSTP with

Can I have multiple INSERT statements following the same WITH statement [duplicate]

I am defining a new WITH statement as newStaff, and then I am taking that data and filling it into other tables. It doesn't seem to let me ref

Leading space with STR function [closed]

I need to get a comma separated list with quotes and I'm almost at that point but I get a list with commas but a leading space at the start bu

Display a PDF file from SQL Server database using C#

I already uploaded PDF files into my SQL Server database as binary data file. I want to retrieve this file and open it with Adobe Reader on my form. Please hel

Superset - SQL Server Analysis Services Compatibility

I am just starting to look at Apache Superset and wondered if anyone knows or has been able to hook SQL Server Analysis Services up as a datasource? I want to p

How do I ignore null values in t-sql function?

I am doing an outer join between two market data tables. The two tables have trading volume reported differently, therefor I need to query them separately and t

MS Access 2016 decrypt field that is encrypted in linked ODBC SQL Server table

I need to encrypt SSN (nvarchar(25)) field in a SQL Server database table. Once encrypted, the Access program needs to be able to decrypt the field for user vi

Alternative for count()

I have used the count() function to calculate each of the rows values select course, count(*) course_count from student_table group by course; Without using

How do I solve SqlNullValueException?

I'm trying to find an entity but I get a SqlNullValueException when entity framework is trying to get the value of a field that's Null. I checked in the databa

How to do a "Select * from" query using odbc

I'm using the odbc package in R, and I have an SQL Server database with a table that has a Name column that is nvarchar(max) and a PublishStatus column that is

TSQL Subquery in from

I am attempting to do a subquery which should work but I am missing something in the syntex. I am trying: select * from (select * from (select *, row_number

SQL Server 2019 > Agent Job execute > Error 'Culture is not supported'

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 th

Data Connection between Excel and SQL Server

I have a dataset in Excel which I have imported in SQL Server. Is there a way in which when I make any change in the Excel data set like add/remove/edit rows or

SQL Server 2019: master db -- How to recreate ##MS_SchemaSigningCertificate in 2048 bits. VA1223

The new SQL Vulnerability assessments are flagging our database with "VA1223: Certificate keys should use at least 2048 bits" (FedRAMP Benchmark). https://docs.

Deadlock in SQL Server in simple update operation

I have a SQL command like this: UPDATE tableName SET ColA = @ColA, ColB = @ColB, ColC = @ColC WHERE ID = @ID which is executed as the sole command in its ow