Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
18 views

SQL Server CTE improves query performance due to larger memory grant? [migrated]

I have a large table (20M+) which has a clustered index on COBID. When I run this query: SELECT * FROM dbo.mytable WHERE COBId = 20240723 AND TradeID = '123456' it completes in around 10 seconds. ...
Jameston's user avatar
0 votes
0 answers
32 views

How do I pass a parameter value in a function when using a join? [duplicate]

I am finding other solutions. I know my SQL Server query is not correct, but I need help to resolve the issue. Below is my query and what I want to achieve with it for better understanding. Gettring ...
shivchandra kumar's user avatar
0 votes
1 answer
67 views

For a table partitioning (by date) scenario seems I have to add the date column to the PK - but doesn't this devalue the PK?

I want to partition a large table that currently has an appropriate column as the primary key. We want to, on a regular basis, remove older rows via partition switching. The table has a date column ...
El Entrenador's user avatar
0 votes
1 answer
32 views

How to use the right index to optimize a database to get rid of unwanted hash matches?

lately we have been learning about database managind through microsoft sql server management studio and were learning of how to use the index function to optimize a consult and data management, and a ...
Iker-JK's user avatar
-1 votes
0 answers
24 views

MSSQL server mirroring [migrated]

I have two VM's One is primary and the second is secondary both having sql server with same make and model. I want to make a communicate both VM's to make sure if the primary server goes down the ...
Raza Sarwar's user avatar
1 vote
0 answers
48 views

If a large table is created from another large table, is that new table saved as a separate entity, or a reference to the original table?

In my scenario, I have a very large dataset with over 25 million rows (call it table B), and that is created from another table that is even larger (call it table A). I have stored this new table B as ...
Andre's user avatar
  • 31
0 votes
0 answers
28 views

Issue connecting to AWS RDS database from remote computer

I have an AWS RDS SQL Server database configured with a public access option. I can successfully connect to the database from my own computer, but when attempting to connect from another external ...
UwUs's user avatar
  • 127
0 votes
1 answer
65 views

Unable to create a 'DbContext' of type NULL. The exception 'Object reference not set to an instance of an object.'

I have a problem with add-migration for my database in ASP.NET Core 8.0. Here is the code ApplicationDbContext: public ApplicationDbContext(DbContextOptions<DbContext> options) : base(...
Trung Đặng Đức's user avatar
1 vote
2 answers
97 views

combine records based on date in between fields

--This is a SQL code I am expecting a compression or combination of records to be considered as continuously prescribed medication. The goal is to figure out how long a patient was on the same drug/...
Drdre01's user avatar
  • 71
0 votes
0 answers
45 views

Through my winform application data is not inserted in the table

I have created a Winforms application using SQL Server for the database. The problem is that, after the code executes successfully, the data is not being inserted into the table. I have verified that ...
Ganesh's user avatar
  • 1
0 votes
0 answers
80 views

Join 2 databases (both on the same server)

I need to join 2 databases, I am using Delphi and ZeosLib. The reason: my client has an application which manages their vacations and which is saved in the first database, now I shall write a program ...
Chaos's user avatar
  • 1
0 votes
1 answer
62 views

How to do cross database queries and inserts using SQL in Azure

Is there a simple way to reference another database on the same server (preferably from a MERGE command)? I have two SQL databases in Azure, ‘main-sql-dev’and ‘temp-sql-dev’. I want to update the main ...
Garry_G's user avatar
  • 305
0 votes
1 answer
66 views

Query Get Sum of Record Based on Criteria

I'm having a task to create the query function for stock management application. I have created query where it will generated temporaryTable like this: (More or less this is user's input desired item ...
Binyamin W.'s user avatar
0 votes
0 answers
52 views

Error when trying to use Copy Database Wizard on Microsoft SSMS. No Fixes Found

I am attempting to copy a database from one server to another. Initially, I was having a problem with permissions which I managed to find a solution to, but now I am running into a new problem. Every ...
SALXAPHONE's user avatar
3 votes
1 answer
84 views

In Delphi, inactive all fdconnection, fdquery and fdtable

I want to disconnect all connections to the design-time database when running the program on client computers. Because all of them are connected to another database at the design-time and may remain ...
Masood Esnaashary's user avatar

15 30 50 per page
1
2 3 4 5
919