Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

I'd like to create a table in my SQL Server. My entity in code contains multiple nested value objects. My Student table is a temporal table. All properties and subproperties of the class Student ...
trophi20's user avatar
0 votes
2 answers
95 views

I get all active items from the database. I check from an external source if they are active or not. And then I set inactive ones as inactive in my database. I do it one by one (as a Java stream) ...
ilhan's user avatar
  • 9,085
2 votes
0 answers
56 views

I have the following function which works as an endpoint function in my .NET Web-API. This function reads a BLOB (as varbinary(MAX)) from a SQL database (video, image, audio) and returns is as a ...
Me3nTaL's user avatar
  • 535
-4 votes
0 answers
74 views

I am maintaining a service that needs to retrieve a large amount of data for each request, between 20-40 queries. Another issue is that for some requests only 50 rows per query are returned, for ...
Victor Schweppe's user avatar
0 votes
1 answer
111 views

I am trying to run a small SQL query in Laravel without the querybuilder. $DB = DB::connection('localhost'); $query = 'select * into newtable from oldtable'; $DB->statement($query); DB::purge('...
Florian DEV's user avatar
-3 votes
0 answers
66 views

I am facing an issue with a SQL Server system stored procedure behaving differently between environments. The following query works as expected on a normal physical Windows machine: EXEC sp_columns_ex ...
Ajin Pradeep's user avatar
-4 votes
0 answers
71 views

I’m trying to display the Description property directly in the table designer grid in SQL Server Management Studio (SSMS) 2026. I want column descriptions to appear next to other settings like data ...
Ahmed El-Noury's user avatar
0 votes
1 answer
89 views

I am having some trouble with a CASE expression inside a JOIN. Essentially, what I would like to do, is whenever a FormLookupId = 31 I want to join on any record with the a specific string in the rl....
Unconquered82's user avatar
-3 votes
1 answer
97 views

I have this table here as example: Group Where Bill Amount A from telephone -300 A from internet -200 A to electricity 500 B from water -1000 B to cable 500 B to gas 500 When you query Group A. The ...
Melz's user avatar
  • 9
-3 votes
0 answers
63 views

I have two tables...one (Table A) has product data from 6 different machines...Date/Time, Barcode and Machine Name being the most pertinent for what I am trying to accomplish. The second data set (...
Rob MacNeill's user avatar
Best practices
0 votes
5 replies
49 views

How to generate a conditional lag in T-SQL? If the visit is a D01 visit and VIS_DAT data is present -> retain VIS_DAT If the visit is a D01/D08 visit, and the VIS_DAT data is missing -> lag ...
Lizz's user avatar
  • 1
Best practices
0 votes
0 replies
16 views

I am looking for advice on how to handle Avro schema namespaces when ingesting data from multiple identical SQL Server databases (sharding scenario) using the Confluent FullyManaged SQL Server ...
Biagio Licari's user avatar
0 votes
1 answer
176 views

I have a requirement to generate unique incrementing serial numbers by product type from a VB.NET application using SQL Server Express. I have created a table and also have a VB form where I am ...
MBinz's user avatar
  • 1
-3 votes
0 answers
98 views

Found myself with this awkward situation: As you can see, the value of field "amount" (float) is shown, when not converted/casted, as "10000". When I cast it to int, it becomes ...
Bob Dubke's user avatar
Best practices
1 vote
7 replies
102 views

I’m trying to understand why PostgreSQL COPY is much slower than SQL Server BULK INSERT in my scenario (or every scenario?). I have 30 .CSV files that are loaded into 6 different tables. In SQL Server,...
Fernando Del Cantão's user avatar
Best practices
0 votes
15 replies
120 views

I have a T-SQL query shown here which is taking forever to run. I am trying to see if there is a better way to write the Inner Join statement. The source table has a millions of rows. Is there any ...
Java's user avatar
  • 1,334
0 votes
0 answers
136 views

I need to get the SQL definition of a view. Problem is, it was created many decades and SQL Server versions ago using whatever GUI was available then, not via a CREATE VIEW statement. Another problem ...
Martha's user avatar
  • 3,774
0 votes
0 answers
51 views

I’m deploying a SQL Server/Azure SQL database using an SSDT .sqlproj (DACPAC) and SqlPackage.exe (DacFx publish). For local dev we require DropObjectsNotInSource=True so schema drift/renames are ...
Rob C's user avatar
  • 940
Advice
0 votes
5 replies
58 views

In principle I should be able to write some VBA code, and run it over a VBA project to amend the project. Scenario: A collection of databases is being moved from one server to another. There are a lot ...
dmhzx's user avatar
  • 61
0 votes
0 answers
37 views

Using SQL Server authentication and Windows authentication, I can login to SQL Server (via SSMS). When using isql via ODBC Driver 17 or 18 in Linux, how to login using Windows account to SQL Server? ...
tlorel's user avatar
  • 27
1 vote
2 answers
150 views

I have multiple functions to convert column values into an array CREATE FUNCTION FN_ToArray ( @separator NVARCHAR(10) = '|' ) RETURNS NVARCHAR(500) AS BEGIN DECLARE @return VARCHAR(500) SET ...
Pyrus's user avatar
  • 117
0 votes
2 answers
107 views

I run the below query against a view in MS Fabric environment (Data Warehouse). Here the compl_officer_id is the same across management_id partition (unfortunately there are no other unique values ...
muskagap88's user avatar
-1 votes
1 answer
125 views

I am trying to access a SQL Server uniqueidentifier using Linq-to-SQL mapping: Table - CREATE TABLE [dbo].[Members]( [guid] [uniqueidentifier] NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ...
aegsomweb's user avatar
0 votes
0 answers
54 views

I am attempting to use package configuration for an SSIS package that uses an OData Connection manager. I am using SSIS 2019 and Visual Studio 2022 running on Windows 10. I am running the following ...
thxmike's user avatar
  • 678
-1 votes
2 answers
129 views

I am trying to flatten out two different tables for a report(view) but I am having a hard time. One table is tbRecord which contains a unique master record id and a sub table tbInspectedPart that ...
EasyE's user avatar
  • 587
0 votes
3 answers
177 views

Here is an extract of table B_TimeEntryMatter. ProformaNr ActivDate Description 451894 17/12/2025 To the provision of a Certificate of Incumbency by the Secretary; 451894 18/12/2025 To time spent in ...
user32213456's user avatar
0 votes
1 answer
107 views

I'm running SQL Server 2022 in Docker: bash docker run -d -p 1433:1433 --name sqlserver -e "SA_PASSWORD=youdontneedtoknow" -e "ACCEPT_EULA=Y" mcr.microsoft.com/mssql/server:2022-...
Brandon's user avatar
0 votes
2 answers
170 views

I need to join 2 tables based on a column named TRANS_ID. The problem is, one table has all available TRANS_IDs and the other table only has SOME of the available TRANS_IDs. For instance, take this ...
Johnny Bones's user avatar
  • 8,504
9 votes
1 answer
319 views

I have table of structure data in SQL Server. I want to travese the tree and find all nodes with a recursive query. Additionally, the structure data is versioned. I want to always use the latest ...
Truncated's user avatar
  • 103
Advice
0 votes
6 replies
38 views

I have seen a number of articles on this but none seem to answer the question. How would I add a catalog to a linked server in SSMS?
Doug Kimzey's user avatar
  • 1,214
1 vote
1 answer
77 views

For some reason I am unable to retrieve an SQL CLR user-defined data type using SqlDataReader. The type seems to be formatted correctly and I can see the type in the data reader in debug, however as ...
James Turner's user avatar
0 votes
0 answers
113 views

I am trying to use pivot, but it's not working the way I expect. The temptable I want to use input is #GenericTeam: Versionnumber Valid_from Team_name Attributenumber Attribute_displayname ...
Cees's user avatar
  • 27
0 votes
2 answers
70 views

I have a column of XML data in SQL Server that I'm trying to parse into columns. The start of the XML data looks something like: <DataSet xmlns="google.com"> <diffgr:diffgram ...
SomethingSomething's user avatar
1 vote
1 answer
67 views

After migrating my database to another server, I can't create folders in the SSISDB catalogue; I get this error: Operation 'Create' on object 'CatalogFolder[@Name='test']' failed during execution. (...
marko's user avatar
  • 549
0 votes
2 answers
151 views

I need to show numbers with a single quote thousand separator in a SQL query, for example: 1'000.00 I tried with something like FORMAT(ISNULL(value, 0), N'N2') or FORMAT(ISNULL(value, 0), '###,###,##...
d_88_l's user avatar
  • 67
3 votes
2 answers
252 views

I have table with an encrypted column UserName: I also have a stored procedure (in SQL Server) defined as below : SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[...
lm.'s user avatar
  • 4,361
Best practices
1 vote
11 replies
120 views

Employee table: Id Name 1 John 2 Peter Attendance table: Id EmployeeId DateTime 1 1 2026-01-10 09:00:00 2 1 2026-01-10 14:00:00 3 1 2026-01-10 15:00:00 This is my SQL query: SELECT E.Name, A....
Gulfam Ali's user avatar
0 votes
0 answers
58 views

I am getting incorrect results to a LIKE query when the like-string is defined as a NVARCHAR type parameter. The problem happens when including either brackets (span of characters) or underscore (any ...
Truncated's user avatar
  • 103
0 votes
2 answers
205 views

I have a TimeZones table that provides a list of all the time zones in the world with names, offset info, etc. I also have a CountryId column in my table which tells me which country time zones are in ...
Sam's user avatar
  • 31.1k
-1 votes
1 answer
136 views

I have an XML and now I want to retrieve the XML nodes and its values in SQL Server and add it into a SQL Server table. This is my XML: <ADN> <gift> <giftdetail> <source&...
Praveen Chowdary's user avatar
0 votes
1 answer
75 views

I am not sure if Hibernate has a support for unbuffered queries but if it has how can I run an unbuffered query on SQL Server with Hibernate?
ilhan's user avatar
  • 9,085
0 votes
0 answers
32 views

Trying to upgrade on prem Azure DevOps 2022.2 to 2026. I've installed the bits and run the configuration wizard. The upgrade failed over inability to connect to the database, because the SQL Server ...
Seva Alekseyev's user avatar
0 votes
0 answers
105 views

I created the this event session to capture queries that hit our server (I have altered predicates just to try and get something working) and nothing seems to be captured. I have checked sys....
Krishnp92's user avatar
0 votes
2 answers
134 views

I am building an ASP.NET Core Web API with an Angular frontend using the DevExtreme DataGrid. I encounter a SqlException when trying to filter my grid by a date column: Microsoft.Data.SqlClient....
Dilshan Prasad's user avatar
-4 votes
0 answers
66 views

I have a 3+ TB database on SQL Server 2019 which has more than 50% free space. I know database or data file shrink is not a good practice so please not go there, I tried with 100 mb in a loop which is ...
user3625272's user avatar
Best practices
1 vote
2 replies
111 views

What recommendations might be offered for the most elegant and performative way with T-SQL to evaluate whether a source value should update a target value, as part of an ETL update process in which ...
504more's user avatar
  • 505
Best practices
0 votes
3 replies
116 views

from a in xx join b in yy on a.someprop equals b.someprop join c in zz on a.someprop1 equals c.someprop where a.someprop2.Contains(strval) I’m trying to understand how SQL query execution works ...
chuackt's user avatar
  • 175
Best practices
0 votes
4 replies
163 views

In SQL Server, I have a stored procedure that returns some sensitive data to the client, and logs that fact into a log table. The stored procedure is executed in a transaction controlled by the client,...
Branko Dimitrijevic's user avatar
0 votes
1 answer
74 views

From reading: https://docs.cloud.google.com/sql/docs/sqlserver/pre-built-tools-with-mcp-toolbox#mcp-configure-your-mcp-client-geminicli-sqlserver I get this error: ✕ Error during discovery for MCP ...
user1824433's user avatar
0 votes
1 answer
102 views

I have table defined like this: CREATE TABLE [staging].[tbPositionAssetIdentifier] ( [StageID] [int] IDENTITY(1,1) NOT NULL, [AssetId] [nvarchar](50) NULL, [SecurityDescription] [nvarchar]...
user2243643's user avatar

1
2 3 4 5
6733