561 questions from the last 365 days
-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
73
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
88
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
121
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
68
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
67
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
2
replies
75
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
168
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
86
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
94
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
165
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
93
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
72
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 ...
Advice
0
votes
1
replies
68
views
Materialized Views aggregation function alternatives
I'am trying to build a view, that will enable me to "cheaply" select the latest value for a specific key from an underlying table that has hundreds+ records for each key.
I thought using ...
-4
votes
1
answer
84
views
Matching on dates when a MM/DD combination needs to be excluded [closed]
I've been tasked to write a query where a month and date combination from one column needs to not equal another date column.
i.e. MED_EFF_DATE = 06/01/XXXX and MED_CANC_DT NOT EQUAL 08/29/XXXX
I've ...