Category "sql-server"

ASP.NET Core 3.0 - Can't Update-Database

I just created the project using the command dotnet new angular -o <output_directory_name> -au Individual and scaffold identity then I installed Microsoft

How to validate the date in a varchar column in SQL Server

I have a staging table which contains all varchar columns. I want to validate a date stored in the data column. Since my staging table contains all varchar colu

yii2 and mssql insert varbinary into model

Hi everyone I have a sql server table that contains fields that are of type varbinary. The table model sees the field as a string, when it tries to save it it g

Unable to execute SSIS Package from SQL Server Agent Job I get error " The command line parameters are invalid"

When I am trying to execute a SSIS package from the SQL Server Agent Job, I get this error: Executed as user: WEATRUST\Prod_SSIS_Service. Microsoft (R) SQL Ser

How to convert hashbytes string from sql to spark equivalent

I have a process using the following select statement in sql server SELECT HASHBYTES('SHA1', CAST('4100119300' AS NVARCHAR(100))) AS StringConverted This give

SSIS package runs fine in VSTS 2019 but not in SQL Server 2017 via SQL Agent or DTEXEC

I have a very basic SSIS package with one SQL Task. It works fine in Visual Studio 2019 but doesn't run in SSMS or via DTEXEC on the server. I have my package

Transactionscope throwing exception this platform does not support distributed transactions while opening connection object

TransactionScope is throwing a exception in .net core 2.2 In this example I created a scope of TransactioScop. Opening SQL transaction for one database which is

How to Connect SQL Server to MySQL using Linked Server ODBC Connection

I'm trying to create a linked server from my SQL Server to a MySQL db. No matter what I do, I get the following error: Cannot initialize the data source object

SUM() with entries from 2 table

Select p.pnum, SUM(CASE WHEN P.NegativeScreen = 'Type99' THEN 1 ELSE 0 END) TotalDetected, SUM(IIF(P.IsPositive = 1, 1,0)) TotalP, SUM

SQL User-Defined table Type in INTO statement

I want to Create a table @tablename with data from a User-Defined Table Type but I get the error Must declare the table variable "@tablename" ALTER PROCEDURE

Can't connect to SQL Server DB from Pyodbc

I am having a difficult time trying to connect to a SQL Server DB on Linux, using pyodbc. I have a ODCINI file entry created. I started with this: import pyo

SQL Server Developer edition on Ubuntu: Allowing remote connections

I've got SQL Server 2019 Developer Edition up and running on my Linux VM. I'd like to remotely connect to that SQL Server instance from my Windows development P

SQL Server Developer edition on Ubuntu: Allowing remote connections

I've got SQL Server 2019 Developer Edition up and running on my Linux VM. I'd like to remotely connect to that SQL Server instance from my Windows development P

TypeORM + FoalTS Multiple Database Connections

For some context, I'm building an NodeJS app with FoalTS which uses Express and TypeORM underneath. My question is around how to implement multiple database con

Connecting to MSSQL from django 1.8 on Ubuntu

I need to connect to MSSQL database from Django 1.8 and preserve Django 1.8 (not upgrade to newer version od Django). I installed pip install django-mssql . ENG

SQL Reporting - No report servers were found

I am trying to configure the SQL Reporting Services (local 2016 installation) but get this exception when I open the configuration manager and enter my host nam

Can't connect to SQL Server from Jetbrains Rider after updating driver to 10.2

I'm using the same credentials as before update. It writes: [08S01] The driver could not establish a secure connection to SQL Server by using Secure Sockets La

Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login failed for user 'sa'

I am trying to execute one stored procedure using 'sa' user through perl script save this line in a perl file and execute that perl file system("start /wait s

SQL Server trigger for verifying date column doesn't work

I have a table for scheduled surgeries and I am trying to write a trigger that will print a message in case the user inserts a past date in the date column (in

Duplicate and Split Row based on value by using SQL Query?

I have set of data and wants to split multiple rows based on the column value. For Example, Source Data: Expected Output: Thanks, Lawrance A