Skip to main content
New: Stack Overflow For Agents. The next generation of knowledge exchange. Learn more
Filter by
Sorted by
Tagged with
Filter by Employee ID
-1 votes
1 answer
81 views

I have the following query: SELECT MAX(F.Surname + ', ' + F.First_Name) AS Female, ISNULL(MAX(M.Surname + ', ' + M.First_Name),'') AS Male, MAX(CP.Comp_Date) AS Comp_Date, H....
Hugh Self Taught's user avatar
0 votes
0 answers
92 views

We handle data migrations using scheduled SQL Server jobs. A month ago, I got a new requirement to migrate the last_add2, batch_no_all, and box_num2 values from a remote database. I updated the stored ...
Tommas Lees's user avatar
Advice
0 votes
2 replies
63 views

My company has a customer that holds a large amount of data in the Oracle NetSuite product. This uses a very complicated data model. For fast reporting of the data, my company has provided our ...
BartAtRanch's user avatar
Advice
1 vote
4 replies
129 views

In SQL Server, I have table myTable with fields patientID, orderID, and orderDesc. patients can have multiple orders with individually variable descriptions. I’m requested to write a query to select ...
ShroudedSpaceWhale's user avatar
Advice
0 votes
1 replies
70 views

I am working on a project where I would need to query from MSSQL server. I am using Python and pyodbc for the work, and I want to use timeout for QUERY EXECUTION. But there is no direct way. Is there ...
Shayan Saha's user avatar
-2 votes
0 answers
97 views

How to automatically create DSN for connection to SQL Server with supplied username and password? The following code I have used worked if I am not supplying username and password, but I need the one ...
Junk Man's user avatar
-11 votes
0 answers
132 views

create table Movies ( movie varchar(100), genre varchar(100) ) create table Actors ( actorName varchar(100), movie varchar(100) ) create table Users ( userName varchar(...
Ariel Fisher's user avatar
2 votes
1 answer
121 views

DDL: IF OBJECT_ID('tempdb..#Tab2And3Pop') is not null DROP TABLE #Tab2And3Pop; SELECT CAST(115704 AS INT) AS ConflictNoticeID , CAST(16003573 AS INT) AS MerchantID , CAST(13 AS ...
Jeff.Clark's user avatar
Advice
0 votes
8 replies
85 views

Is there an index hint in T-SQL that says "do not use any nonclustered index that would require a key lookup"? Apart from that one restriction, I want to let the query planner have a free ...
Ed Avis's user avatar
1 vote
2 answers
189 views

For a non-admin user, with 'Select' permissions on a 'View', they are able to count the number of rows and display all the contents of a SQL 'View': select * from dbo.BackupInfoView; select count(*) ...
pilipeet's user avatar
Advice
0 votes
5 replies
140 views

I have a query that pulls in the account number, service date, and 20 other fields. Some accounts have several service dates, so I need to return only the most recent one for each. Here is a slimmed ...
user3691608's user avatar
1 vote
2 answers
109 views

The subset of products - reduced for categories and product lines assigned to the user - should be extended by products from explicitly named groups. So far, the following code works: products = ...
pepr's user avatar
0 votes
1 answer
84 views

I am trying to build a web API using Express + Typescript using this Github repo as a starting point. I am using the mssql package with the default tedious driver. This is my config: server: '...
whatwhatwhat's user avatar
0 votes
0 answers
80 views

With compat 170 (in SQL Server 2025), I'm seeing "Cannot continue the execution because the session is in the kill state." when using an outer join with a variable as part of the join ...
Simon M's user avatar
2 votes
0 answers
244 views

Problem is specific to compatibility level 170 from what I can see. With a trigger like this: DROP TABLE IF EXISTS TC2; CREATE TABLE [TC2]( [id_tc2] [int] IDENTITY(1,1) NOT NULL, [nme] [...
Simon M's user avatar

15 30 50 per page
1
2 3 4 5
22425