Skip to main content

Questions tagged [sql-server]

Microsoft SQL Server is a relational database management system (RDBMS). Use this tag for all Microsoft SQL Server editions including Compact, Express, Azure, Fast-track, APS (formerly PDW) and Azure SQL DW. Do not use this tag for other types of DBMS (MySQL, PostgreSQL, Oracle, etc.). Do not use this tag for issues on software and mobile development, unless it is directly related to the database.

Filter by
Sorted by
Tagged with
0 votes
1 answer
13 views

I've installed SqlPackage on Mac, for CLI automation/simplication of SQL Server development tasks, however I'm getting error: zsh: command not found: SqlPackage
Chris Halcrow's user avatar
2 votes
1 answer
72 views

Consider the following query in SQL Server (I tested with both SQL Server 2019 and 2025): select val from ( select val = N'abc' ) x where val like N'%ʹ%' Note ...
sstan's user avatar
  • 36.9k
3 votes
1 answer
105 views

I am working on a simple user defined function. It just accepts a varchar(100) parameter, does some string manipulation (nothing more complex than SUBSTRING, CHARINDEX, REPLACE etc. and returns a ...
Eric G's user avatar
  • 53
0 votes
1 answer
83 views

Is there a table in MSDN somewhere which shows the SQL Server correspondence values? SELECT @@VERSION AS 'version', SERVERPROPERTY('ProductVersion') In this query, ...
Igor's user avatar
  • 6,546
Best practices
0 votes
3 replies
67 views

I have been building a concurrent system for a while. In the past I found some articles about "serializable" transactions. I have been using code first EF Core primarily for any database ...
Vladimir's user avatar
  • 398
-1 votes
0 answers
61 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 ...
trophi20's user avatar
0 votes
2 answers
110 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
60 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, ...
Me3nTaL's user avatar
  • 535
0 votes
0 answers
118 views

I am trying to run a small SQL query in Laravel without the querybuilder. ...
Florian DEV's user avatar
-3 votes
0 answers
73 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: ...
Ajin Pradeep's user avatar
-4 votes
0 answers
74 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
91 views

I am having some trouble with a CASE expression inside a JOIN. Essentially, what I would like to do, is whenever a FormLookupId =...
Unconquered82's user avatar
-3 votes
1 answer
102 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
Best practices
0 votes
5 replies
52 views

How to generate a conditional lag in T-SQL? If the visit is a D01 visit and VIS_DAT data is present -> retain ...
Lizz's user avatar
  • 1
Best practices
0 votes
0 replies
17 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
186 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
99 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 ...
Fernando Del Cantão's user avatar
Best practices
0 votes
15 replies
124 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 ...
Java's user avatar
  • 1,334
0 votes
0 answers
137 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 ...
Martha's user avatar
  • 3,774
0 votes
0 answers
53 views

I’m deploying a SQL Server/Azure SQL database using an SSDT .sqlproj (DACPAC) and SqlPackage.exe (DacFx publish). For local dev ...
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 ...
tlorel's user avatar
  • 27
1 vote
2 answers
150 views

I have multiple functions to convert column values into an array ...
Pyrus's user avatar
  • 117
0 votes
2 answers
109 views

I run the below query against a view in MS Fabric environment (Data Warehouse). Here the compl_officer_id is the same across ...
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 - ...
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
133 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 ...
EasyE's user avatar
  • 587
0 votes
3 answers
179 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 ...
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 ...
James Turner's user avatar
0 votes
0 answers
115 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: ...
Cees's user avatar
  • 27
0 votes
2 answers
71 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: ...
SomethingSomething's user avatar
1 vote
1 answer
68 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 <...
d_88_l's user avatar
  • 67
3 votes
2 answers
254 views

I have table with an encrypted column UserName: I also have a stored procedure (in SQL Server) defined as below : ...
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 ...
Gulfam Ali's user avatar
0 votes
0 answers
59 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 (...
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 ...
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: ...
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
106 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 ...
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 ...
Dilshan Prasad's user avatar
Best practices
1 vote
2 replies
112 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
118 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 ...
chuackt's user avatar
  • 175
Best practices
0 votes
4 replies
165 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

1
2 3 4 5
6731