Skip to main content
5 votes
3 answers
127 views

I have a Region table where MapID is the primary key. Each MapID can have EmployeeID or Zip5. For any MapID, EmployeeID takes the precedence over Zip5 i.e. for any MapID, if there is an EmployeeID, ...
unicorn's user avatar
  • 640
3 votes
2 answers
147 views

Based on the table values shown 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 ...
hobosapien's user avatar
2 votes
3 answers
170 views

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 ...
Stephen Long's user avatar
2 votes
2 answers
151 views

I noticed something strange regarding SQL Server bulk operations and permissions. When I run this command inside SQL Server: BULK INSERT dbo.MyTable FROM 'C:\Data\file.dat' WITH (DATAFILETYPE='native',...
Serkan Ekşioğlu's user avatar
2 votes
1 answer
105 views

Is it possible to set the AllowBlank property of a parameter in a SSRS report via SQL query? I want to do this, because I have in the parameters one which is depending on another parameter. When the ...
Patrick's user avatar
  • 55
1 vote
2 answers
155 views

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 ...
user2854333's user avatar
1 vote
0 answers
164 views

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 ...
user32056484's user avatar
0 votes
2 answers
115 views

I am calling a SQL Server stored procedure from C#. It works fine as long as the result is not longer than 2033 characters. If it is longer than 2033 characters, the result is truncated at 2033 ...
Mark Ainsworth's user avatar
0 votes
2 answers
121 views

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].[...
mangg's user avatar
  • 63
0 votes
1 answer
118 views

In SQL Server 2019, I am trying to convert NVARCHAR(max) timestamps (ex. 02-DEC-25 05.27.13.318965000 PM) to datetime (ex. 2025-12-02 17.27.13). I have tried multiple methods and always seem to get ...
Soup Gyro's user avatar
Best practices
0 votes
4 replies
139 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
86 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
0 votes
1 answer
165 views

The data management company stored all of the numeric fields in a table I need as varchar, for some reason. As I work with them to try to get it fixed I still need to do my work so I am trying to ...
tolle1038's user avatar
Best practices
0 votes
2 replies
96 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
  • 495
0 votes
1 answer
71 views

I have 2 tables with a column called Participant ID. One table is completely null/empty in said column and the other table is filled. I would like to input the data from the filled table into the ...
Jordan's user avatar
  • 3

15 30 50 per page