44 questions from the last 30 days
5
votes
1
answer
124
views
Calculate a running highest streak
I am working on a gaps & islands problem in MS SQL Server. I'm doing a daily challenge, and the table is a list of days I accomplished the task and the challenge day (calendar days since the first ...
3
votes
1
answer
146
views
Why does appending data with PySpark raise a "SQLServerException: CREATE TABLE permission denied" exception? [closed]
In my Databricks cluster I'm trying to write a DataFrame to my table with the following code:
df.write.jdbc(url=JDBCURL, table=table_name, mode="append")
And this line fails with
...
Advice
2
votes
8
replies
118
views
Android driver app location sending to server (Taxi booking app)
I developed a simple Android app (A driver app for taxi booking).
App sends its location (lat/lng) every 5 seconds to server using TCP/IP. and server stores the driver location in SQL SEVER database. ...
2
votes
2
answers
186
views
Join on one column and if null join another column
I need some help handling null columns in joins. I have three tables (below are just examples) Map, Employee and Region. Primary table is Map where I join Employee table on the MapID column to get ...
2
votes
0
answers
135
views
Using two words in LIKE operator (eg.: %John%Doe%) VB6
TL;DR Is it possible to search for matches using two words in LIKE operator?
Eg.: rsCustomers.Filter("Name LIKE '%John%Doe%'").
I have this ADODB.Recordset called rsCustomers that persists ...
Best practices
1
vote
1
replies
101
views
Should I separate a 10+ TB SQL Server data warehouse into multiple databases or keep it in one with multiple schemas?
Our team manages a SQL Server 2019 data warehouse that’s grown to over 10 TB.
It currently uses a single database with multiple schemas (clinical, financial, hr, operations, staging, etc.).
Our DBA is ...
1
vote
2
answers
109
views
Clustered columnstore index with computed column -- why does segment elimination not work?
Recent versions of Microsoft SQL Server allow creating a clustered columnstore index on a table that has computed columns, as long as they are not persisted computed columns. [1]
I would like to get ...
0
votes
1
answer
74
views
Varying SQL query results [duplicate]
I have a table valued function called "elara_customer_byname". When I execute SELECT * FROM elara_customer_byname('%Kar%') I get 2 rows, which is incorrect. If I copy the SQL from the ...
0
votes
1
answer
126
views
Compare the results of Boolean expressions
Is there any way to compare the results of Boolean expressions as in the following query? This expression gives the error Incorrect syntax near '='. at the first '='.
select *
from Transfers
where (...
0
votes
1
answer
135
views
How do I create connection string with App Registration/Service Principal for a Web API using EF Core app with SQL Server using Microsoft Entra MFA
I have a generic ASP.NET Core Web API that uses EF Core to connect to a SQL Server instance that uses Microsoft Entra MFA account.
The connectivity prompt for the SQL Server looks like this:
I have ...
0
votes
0
answers
47
views
Best practice for backing up large SQL Server databases to S3 [closed]
We are currently backing up all of our databases to a series S3-Compatibable storageGRID buckets hosted by our data center provider. Some of our larger databases backups run quite long (upwards of 8 ...
0
votes
0
answers
67
views
Long-running procedure being terminated before finishing
We have an End-to-End process which loads data into a Landing database. It used to run individual repopulate scripts for each data source in sequence, but that was taking more and more time to the ...
Advice
0
votes
2
replies
83
views
Process improvements, A company wants to incorporate AI but the current process hadn't change in 25 years
Goal
The company wants to grow and take advantage of the AI revolution. But there is no roadmap and the current process limits their growth capability. The current process is about 20% automation and ...
0
votes
0
answers
58
views
Ranking needed for each change in status [duplicate]
I need to get a row number to change each time a StatusID changes. When I use the query attached I get the RowID, but I would like to get the column RequiredRowID.
select
SequenceNo,
...
0
votes
0
answers
135
views
Can on-premises SQL Server be accessed via SQL Connector in a Power Platform VNET-linked environment?
I'm trying to connect to an on-premises SQL Server instance using the SQL Server connector in Power Automate within a Power Platform environment linked to an Azure Virtual Network (VNET).
Microsoft ...
-1
votes
0
answers
22
views
SQL Server Express Master database corrupted tables [migrated]
I'm helping out someone where it looks like their previous developer stored some data tables in the Master database in SQL Server Express 2014. I don't know if it was to see if one could get around ...
-1
votes
0
answers
52
views
sqlpackage.exe trying to alter column even though no changes are visible [closed]
I have an Azure Managed SQL Instance with SQL Server 2022, I'm trying to add column-level encryption to source control (Azure DevOps pipeline/Git) where it's already configured/deployed on the target ...
-1
votes
0
answers
101
views
How to enable full-text search feature in SQL Server on .NET Aspire?
How to enable full-text search feature in SQL Server for .NET Aspire?
var sqlServer = builder.AddSqlServer("sqlServer", builder.AddParameter("password123!!!", true))
.WithLifetime(...
-2
votes
0
answers
43
views
Intermittent Database Connection Issues when using SSMS [closed]
I'm having intermittent connectivity problems when trying to connect to an azure based SQL database when using SSMS. I've done the following troubleshooting:
The exact same version of SSMS has been ...
-3
votes
1
answer
52
views
Connecting SQL Server to Cypress
I am trying to connect the DB for testing web elements that have dependencies on data, and in general to add some reliable BE testing.
Currently I have cypress.config.js:
// cypress.config.js
const { ...
-3
votes
0
answers
58
views
Php and mssql. Extracting data from an MSSQL stored procedure to PHP [duplicate]
I have a stored procedure and know its input parameters. How can I extract this data from this stored procedure in PHP?
I have a query that allows me to display this data in the MSSQL database itself. ...
-5
votes
1
answer
129
views
Excluding NULL from a comparison [duplicate]
I've got a query which I will simplify it to be:
SELECT *
FROM BLAH
WHERE PPO_DISC_ID NOT IN ('009-003')
AND PPO_DISC_ID NOT LIKE '20%'
AND MyNum = '30788'
My problem arises when PPO_DISC_ID is ...