336,383 questions
0
votes
1
answer
80
views
VB.NET SQL select columns and display in grid
While creating a MP3 playlist generator, I can't figure out how to make the code below work.
In my database, I have a table which contains all of the MP3 attributes of a track, including the path to ...
0
votes
1
answer
82
views
Get an history of changes of many tables
I have 3 tables that all are system-versioned temporal tables, let's call them FOO BAR and BAZ . They are linked like this:
FOO -> 1-N -> BAR-> 1-N -> BAZ
I want to retrieve the full ...
7
votes
1
answer
188
views
How to map complex property from stored procedure results in Entity Framework Core?
I am trying to map the results of a stored procedure to a keyless entity in Entity Framework Core, but I am getting this exception at runtime:
System.InvalidOperationException: The required column '...
0
votes
0
answers
179
views
Is a fast-return possible when parameter value not provided [migrated]
I've got a query looking for accounts against the user-provided input:
SELECT * FROM accounts a
WHERE a.dep_id in :depIds
AND (
(a.key_identifier IS NULL AND a.name LIKE CONCAT(:searchText, '%...
1
vote
2
answers
151
views
Multiple delimited strings insert in nested while loop [duplicate]
I'm using SQL Server 2014 so no split string function is available.
I have two delimited strings (Brand and Location) to insert in my stored procedure to create (potentially) multiple rows in the ...
Advice
1
vote
9
replies
153
views
Which is the best approach for faster API request and response handling in react js UI?
I am developing an application using ASP.NET and I want to improve UI performance when sending and receiving API data.
Which approach is best for getting faster API request and response handling in ...
0
votes
0
answers
76
views
How do I programmatically drop a generated DEFAULT constraint? [duplicate]
I created a table in a script where one of the columns was established as such:
CREATE TABLE [schema].[table](
[ColumnName] [int] DEFAULT 45);
This will randomly generate a constraint like so: ...
Advice
1
vote
15
replies
219
views
Get latest partnership when start date is in one table & end date in another of partnerships
I have two tables. One has the 2 partners & their events start date. The other has identical layout but has the last event date of the partnership. I need to get the last/current partnership with ...
-1
votes
0
answers
14
views
Managed backup disabled, but .xel files still created [migrated]
All of my SQL Server instances (2019) have what appear to be a collection of .xel files in the default SQL Server Log folder. I assume they are output from an extended event associated with Managed ...
0
votes
1
answer
170
views
Error when I run SELECT queries to pull data from DB2 and write to SQL Server
I have a Python script that takes some SELECT queries and puts them on separate timers with threads, and each one queries periodically at set intervals. I have a SQL Express DB to store the tables I ...
-1
votes
0
answers
40
views
SQL Server Showing 1% Usage But Drive Has 95GB Free [migrated]
We have a SQL Server installed. We have a 500GB drive for the database. Currently, we have 95 GB free on this drive. When I go into the database, and look at the Shrink File toolset, it shows the ...
0
votes
0
answers
33
views
Locate stored procedure sys.sp_replmonitorrefreshdata in SQL Server's distribution DB [migrated]
Replication monitor is part of SQL Server suite. It is used to display active replications.
It calls this stored procedure:
exec [distribution].sys.sp_replmonitorhelppublication @publisher = N'<...
Advice
0
votes
7
replies
120
views
How can I efficiently handle multi-tenant database connections in ASP.NET Core using SQL Server?
I am building a multi-tenant School Management System using ASP.NET Core and SQL Server. Each tenant (school) should have isolated data, and I am confused about the best approach for managing database ...
1
vote
1
answer
140
views
Create a foreign key with multiple columns but only one reference
I have two tables, and I'm looking to create a foreign key constraint between them. The tables are essentially structured as follows:
Table 1:
Name
Description
idx
Table 2:
Tbl1_idx1
Tbl1_idx2
idx
...
Advice
0
votes
8
replies
178
views
Generate # repeating value from another table
I have a SQL table that shows how many QTY of boxes available with respective name of each boxes.
And then I have another product table that sequence by the weight.
The first 5 sequence of items ...
