I'm looking to calculate the number of days that overlap between to (DateTime) spans of time. Logic behind the question is: A prisoner is serving a s ...
I'm looking to calculate the number of days that overlap between to (DateTime) spans of time. Logic behind the question is: A prisoner is serving a s ...
I have a table that contain dynamic data. I need to split Details column with tab character and then convert into column (currently used split_string ...
I use SQL Server 2016. Below is the rows in table: test_account. You can see the values of updDtm and fileCreateTime are identical. id is the primary ...
Periodically I need to generate a report based on some data from database. The first select IS: SELECT DISTINCT A.PRO_C_NOME, ...
I'm trying to create a trigger on table MainDataTable that will insert a row to table EPR conditionally. These are the conditions. If an insert is m ...
Edit for better clarification. I have a table created with two columns around 60 rows Table output: I want to loop through each row of SiteDboT ...
CREATE TABLE #A (UpperLimit NUMERIC(4)) CREATE TABLE #B (Id NUMERIC(4), Amount NUMERIC(4)) INSERT INTO #A VALUES (1000), (2000), (3000) INSERT I ...
Im using SQL Server 2016, and have a very large table containing millions of rows of data from different sources at irregular intervals over several y ...
In SQL Server 2016, I have a table with the following chaining structure: dbo.Item OriginalItem ItemID ...
We have 3 coldfusion servers. All of them have the same settings, as far as I can tell. The sql server connected has a linked oracle server, and when ...
I need to get the following output about the sql query: { "records": [ { "attributes": { "type": "customer" ...
We have a table that contains a snapshot of every employees data at the end of each month until the month they leave the company. This table also has ...
I have a lot of logfiles that I want to load into a SQL Server database via a Talend job so that I can preserve the logs without keeping the files in ...
I have a table that only contains pay dates: Pay Date 03/05/2022 03/25/2022 04 ...
My goal is to look on ID column in TableA -> ServerA and then if there are any new records that program could find in TableB -> ServerB that are ...
I need to generate a sequence in SQL Server 2016 database based on the following logic. I have three fields each represents ID of Brand, Category and ...
Requirements: Have all the customers listed from the first table, then pull any classes that match conditions from the second table and third table, w ...
For one the production system, different date/time format I am getting data time like 11.22.2022 09.10.00 and when try to run below sql query I am get ...
I have the below table which gets loaded into my DB each night (this usually contains more rows, but I have just included 2 for example). I then have ...
I have an inline table-valued function, which splits strings into row of substrings based on a specified separator. It is as follows: Usage: SELE ...