336,453 questions
1
vote
2
answers
73
views
Why Does SQL Date Value Become NULL When Using AddWithValue?
if (connection.State == ConnectionState.Closed)
{
connection.Open();
string signup = "INSERT INTO TABLE (ID,NAME,SURNAME,MAIL,PASSWORD) VALUES (@ID,@NAME,@SURNAME,@MAIL,@PASSWORD)";
...
Best practices
0
votes
3
replies
36
views
How should I interpret SELECT vs INSERT/UPDATE/DELETE ratios when designing indexes for an OLTP workload?
I'm analyzing a SQL Server 2022 OLTP database and trying to refine my indexing strategy based on actual workload patterns.
The exact schema and queries cannot be shared, but the observed ratios and ...
-2
votes
0
answers
39
views
SQL Server 2016 Patch has broken SQL Server - need traceflag 902 to access server [migrated]
Our platforms team has changed the way in which we install SQL Server patches.
This weekend, a number of patches have been applied on SQL Server 2016 and appear to have broken the servers.
Database '...
-2
votes
0
answers
79
views
Saving  character before pound sign in SQL Server [closed]
I have a comment textbox and someone saved a text value with £ symbol in it and it shows correctly on page (page has charset iso-8859-1), however it doesn't get saved correctly into the database.
Page ...
0
votes
0
answers
94
views
PDOs parameter binding is avoiding indexes and tanking performance
I have been building a Laravel app and this weeks launch has shown that my database does NOT like how queries are being executed.
When launching my app, our database becomes very slow. Simple queries ...
0
votes
1
answer
126
views
WHERE clause with nvarchar can't distinguish between special characters
I am working with a database that contains some special characters in nvarchar columns. Specifically, it has some text written in special characters, like those font generators create for Twitter or ...
Advice
0
votes
0
replies
72
views
Data type mapping strategy (Migrating Oracle 19c DB into SQL Server 2022 using SSMA)
Do anyone have any good strategy for data type mapping equivalent to be used, specifically for the NUMBER data type from the Oracle source. The default mapping that SSMA uses is FLOAT(53) but as much ...
Advice
0
votes
2
replies
73
views
Using a date parameter to control data volume across DEV/UAT/PROD — is this a recognised pattern?
I've read about environment strategies for data pipelines. The common answers are UAT gets a prod backup restored periodically and DEV gets synthetic data or a manual subset. But nobody addresses how ...
Advice
0
votes
3
replies
80
views
Search SQL Server Database And Return Results Based On A Subset of The Conditions Being Met
I would like to query SQL database and set conditions in the Where clause that return results if a specified number of the conditions are met rather than if all or any of the conditions are met.
For ...
Advice
1
vote
9
replies
175
views
Get Start date of a current partnership
I need to get the start dates of a partnership in different disciplines where the partnership previously existed but the individuals participated with other partners then resumed their partnership. I ...
Best practices
0
votes
3
replies
90
views
Should I use NVARCHAR(MAX) or NVARCHAR(4000) for scarcely filled columns?
Assume we have a really big table in SQL Server with millions of rows. There is a text column that can contain quite long character strings (limited to say 4000 characters of length), but the column ...
0
votes
0
answers
97
views
SQL Server Polybase importing parquet: Operand type clash: bigint is incompatible with datetime
We have a parquet file on S3 and are importing it into SQL Server 2022.
The issue is that mydatetimefield is a timestamp dtype (internally stored as bigint) in parquet file and the dtype on import ...
-1
votes
3
answers
171
views
Select from a table where the column name is a value in the table
I have data from one query that I need to query into a specific format. The data for one of those new columns could be in one of three column in the original data depending on a code. That code is ...
Best practices
0
votes
3
replies
99
views
Difference of count aggregation of two columns
I have a table DepartmentChanges that looks something like this.
EmployeeID
PreviousDept
NewDept
UpdateDate
101
Sales
Marketing
2026-01-14
102
Admin
Sales
2026-02-02
I want to get a query of the net ...
Best practices
0
votes
4
replies
77
views
Monitoring fields in all tables with SSMS
I am in a internship in which I supervise a part of the BI Pipeline.
To be exact of where I am in the pipeline, I can only see the tables of which an administration gave me access to in some precise ...