Category "sql-server"

How can I create a partitioned table in EF Core?

Let's say I have an object like this: public class ObjectA { public int Id {get;set;} public DateTime CreatedOn {get;set;} ...etc } I want to partitio

Query to return database, schema, table, column for all databases

EDIT: I have edited my original post to add some clarity. 1) Is it possible to write a query that will return database, schema, table, column, and column type

SQL How to get categories that don't contain products?

SELECT DISTINCT {c2.name} FROM {BrandCategory AS c JOIN CategoryProductRelation AS c2p ON {c.pk} = {c2p.source} JOIN Product AS p

SQL Stored Procedure Parameter set to Uppercase

I want to force a user's string input in a stored procedure to uppercase. I tried writing UPPER prior to the @parameterName but I got a syntax error. Is this

SQL Stored Procedure Parameter set to Uppercase

I want to force a user's string input in a stored procedure to uppercase. I tried writing UPPER prior to the @parameterName but I got a syntax error. Is this

EF Core executing previously failed query on SaveChanges

We have a .Net Core 3.1 application which is using EF Core to connect wit the SQL Server database. We are facing one problem, that when an exception occurs in o

EF Core executing previously failed query on SaveChanges

We have a .Net Core 3.1 application which is using EF Core to connect wit the SQL Server database. We are facing one problem, that when an exception occurs in o

Formatting MySQL output in online IDE

Test platform Used - HackerRank | MySQL/MSSQL Recently attempted an code assessment for a job post involving SQL questions. I was able to get the correct output

What do these different properties in SQL Server's (Azure Synapse's) Estimated Execution Plan mean?

I'm trying to work on the statistics, and as a part of it, I'm trying to look at the execution plan of certain SELECT * commands with a WHERE condition on a par

cannot access Postgres views from SSIS thru ODBC PSQL driver

I'm working with Postgres from SSIS thru ODBC Unicode driver ver 13.01. 32-bit connection. I can successfully connect to all Postgres tables but can not able t

Using SqlConnection in Xamarin.Forms?

Can I use SqlConnection in Xamarin.Forms? I tend to use this in Windows and Web applications developed in Visual Studio, but I don't know how it would work in

Connecting an HTML webpage to a SQL Server

I am attempting to display a table from my Azure SQL database on a webpage. I have been looking around and can't seem to figure out why this isn't working This

Why can't I re-authenticate (MFA with mssql extension for VS Code)?

Here's an example of a connection configuration that has stopped working (it's for connecting to an Azure managed database): { "server": "sqldb.12345abcde.dat

linked server : "No transaction is active." and "unable to begin a distributed transaction"

I have a CRM software on my local machine. In the SQL DB of the software, I added a linked server (our test website with our test DB: Windows Small Business Ser

Running total in SQL with a reset condition

I have a data that combines inventory, sales forecast, and future supply data for different parts. I have combined it to give me a table that gives a net quanti

Connecting to an Azure database using SQLAlchemy in Python

I am trying to connect to an Azure database using SQLAlchemy in Python. My code is the following: engine_azure = \ create_engine('mssql+pyodbc://{Server admin

Time Flow Chart in SSRS (2016)?

I am trying to create a report table in SSRS 2016 but I am not sure how to go about it or if it is possible. I am trying to recreate something similar to that

Using 0 as Primary Key

I use lookup tables commonly and sometimes I have some default record in the Lookup table and I think for this record I can use 0 as Primary Key a as shown belo

Dynamic SQL Query in C#

I'm trying to create a query with a variable number of parameters, giving to the program the name of the table and an Array for the names of parameters and anot

Laravel MSSQL Server Connection not working

Laravel version:7.13, SqlServer:2019 SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by