Category "sql-server"

Why does commandTimeout raise SqlError in IDbConnection.Execute?

I have an IDbConnection to a SQL server and two stored procedures I would like to start from a console app using the Execute method on the open connection. When

SUM Values by Sequence Number and Group By Flag

We have a list with a sequence number. The sequence will break, then begin again. As you can see below, the SalesOrderLine is missing the number 4. SalesOrder

How to find all paths recursively from relational table in SQL Server using transitive property?

I would like to be able to recursively find all relationships in a table. I have a relational table, and essentially I would like to apply the transitive proper

Take the nearest row by condition in date, student frame

I am struggling to get the nearest 'Math Test' or 'Biology Test' in (+/- 3 hours) from Test= 'Marked A+' including TestOrder ordering. If 'Math Test' or 'Biolog

SQL Convert numbers into Date

I'm a beginner in SQL and I need your help please! I have a project which is convert Social Security Numbers into birth date. In the database, I have a column M

jQuery AJAX Not Returning Error Message with SQL Server

I'm testing jQuery AJAX to return data from a SQL Server table. In the AJAX call I have a failure function to show any potential errors in an alert box. However

Anonymous access to azure table

Please can someone give me guidance on how to set up anonymous read-only access to one specific table in Azure. I have a table that I want Power BI students to

On Amazon SQL Server RDS, how can we identify all apps that are connecting using the direct server name and not the alias?

We are soon to migrate our back-end from an Amazon SQL Server RDS to another identically set up RDS server. We intend that our systems will not be interrupted b

Removing duplicates returned based on the column value

This SQL gives me the blog comments that contain just the banned words defined in my table. I only get the EXACT matches and it removes duplicate rows. It also

How to properly use JPA/Hibernate?

I'm trying to understand annotations better with JPA / Hibernate and SQL Server. I created a simple project: an abstract class named "Articles". Two classes inh

A simple function to query MSSQL then close the connection for use in quick scripts

I have a script that I want to be able to schedule to run periodically, and query a DB, open a connection, execute a query, then close the connection. Trying to

Display percentage of registered members that have not rated a Movie

I have the following three tables. See full db<>fiddle here members member_id first_name last_name 1 Roby Dauncey 2 Isa Garfoot 3 Sullivan Carletto 4 Jac

How do I fix SQL Server Database Project Ambiguous References?

I am having trouble getting Visual Studio 2022 (and 2017) to work with a simple Database Project. I have extracted a data tier application and stored it as a .

How to have docker compose init a SQL Server database

I have a docker compose file which creates a starts SQL Server. This is working fine. I can connect to the database and see the master database. What I am tryin

System.Data.Entity.Core.MetadataException: 'Unable to load the specified metadata resource.' 2022

[Enter image description here] 1 I got this error when I tried to run the system. I am not sure why. it used to display the information from a database. Please

Select Statement inside of

I get error "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used

How to run an Azure SQL Server Stored Procedure using an Automation Account Runbook with Managed Identity?

I am trying to run SQL Server DB index and statistics maintenance activating a stored procedure called AzureSQLMaintenance with a PowerShell Runbook in Automati

Sequelize dialect dependency on msnodesqlv8

We are using sequelize package to connect to mssql server. Our backend code is in javascript. We have a working code like below: const sequelize = new Sequelize

Inserting Data to SQL Server from a Python Dataframe Quickly

I have been trying to insert data from a dataframe in Python to a table already created in SQL Server. The data frame has 90K rows and wanted the best possible

Issues connecting SQLedge to asp.net projects on m1 mac

Back Story: So I've been recently developing some c# sharp projects using a m1 Mac and a sql image (sqledge) hosted in a docker container. When trying to connec