336,726 questions
0
votes
0
answers
14
views
Can Transact-SQL snapshot backups be done with commodity hardware in Docker? [closed]
My preferred SQL Server home lab is in Docker on a low grade laptop. I want to see how availability group secondaries react to application-aware snapshots. Transact-SQL snapshot backups make most of ...
0
votes
2
answers
29
views
Return rows from a group of rows if a specific value does not exist within the group
Based on the table values below I am trying to return all rows for each Name, Activity, and Date when 'No Activity' is not in the Activity column for those dates.
I attempted the following but it is ...
0
votes
1
answer
48
views
Set-SqlColumnEncryption fails when dropping unrelated scalar function
Set-SqlColumnEncryption keeps failing, it's trying to drop a scalar function that is completely unrelated to the table columns being encrypted, thus failing.
$smoDatabase = Get-SqlDatabase -...
-3
votes
0
answers
23
views
Issue with Query Store Showing “Restricted Text” in Azure SQL Managed Instance [duplicate]
I am experiencing an issue with Azure SQL Managed Instance where some of the long-running queries in Query Store are displayed as “Restricted Text” instead of the actual query text.
Details:
...
0
votes
2
answers
111
views
How to perform skip and take in Linq with joining multiple tables in optimized way
How to write a linq query that does the same as this SQL statement:
select *
from [dbo].[LitEdit] as le
inner join [dbo].[LitEditJob] as lej on lej.BulkEditId = le.Id
inner join [dbo].[...
0
votes
0
answers
47
views
Fabric Mirrored On-Premise SQL Server Database not updating [closed]
I have a mirrored on-premise SQL Server.
The set-up & connection is working. I can query the mirrored database without any issue, but the database is not being updated by itself.
When I stop the ...
2
votes
2
answers
141
views
SQL Server stored procedure passed a Biztalk XML message not returning field values when parsing the XML text
Our integration team want to send a XML parameter from their Biztalk server containing values to be written to a SQL Server table using a stored procedure, and have sent me an example for me to create ...
-4
votes
0
answers
118
views
Best practice to solve webservice blocking connectivity of SQL Server [closed]
I've run into a problem with my ASP.NET webservice and its connectivity to the SQL Server database (separate server).
The webservice works relatively nicely with a few 100k calls to it every day. But ...
1
vote
0
answers
141
views
Using non hard-coded values for test conditions within VS SQL Server Unit Test Project
Is it possible to use non hard-coded values for asserting scalar values in VS SQL Server unit test project? Below I have the variable @ResourceId that I'd like to test against the value of a column ...
-2
votes
1
answer
168
views
Updating a table with CASE
In this example I wanted to replace every NULL value in the Quantity column with the mean of the column. I'm using CASE here to achieve that but what ends up happening is instead of replacing NULL ...
-4
votes
0
answers
133
views
How to fix access to sql server? [closed]
My Error:
Cannot open server 'test-sqlserver' requested by the login. Client with IP address 'x.xx.xx.xx' is not allowed to access the server. To enable access, use the Azure Management Portal or run ...
-3
votes
0
answers
127
views
No rows are inserted into the table [closed]
Consider following:
qry2 = L"INSERT INTO abcattbl SELECT ?, ?, (SELECT object_id FROM sys.objects o, sys.schemas s WHERE s.schema_id = o.schema_id AND o.name = ? AND s.name = ?), ?, 8, 400, \'N\'...
-4
votes
1
answer
87
views
How do I "flatten" QBO Scoring Data [closed]
I've used the qbo AiScoreEngine to extract data from documents. My score template includes these items:
FirstName
LastName
Loan
Payment
LateFee
I would like a query that generates this:
Document
...
-3
votes
1
answer
130
views
Merge Rows into single column
I have a table in below format .
I am trying to merge columns and convert into row.
I tried doing that using PIVOT but it is taking column as entry and not allowing me to pass values.
Here is my ...
1
vote
2
answers
150
views
Combine Multiple Tables into Single Resultset
I have 4 tables with data shown here in SQL Server 2019 (RTM) -15.0.2005
Table 1: Buyer
ID
NAME
123
ABC
234
XYZ
456
MNO
Table 2: Sell Detail
Sl No
ID
TYPEID
A
123
1
B
123
2
C
123
3`
D
234
1
E
456
2
...