Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-1 votes
1 answer
173 views

Simplifying, I have the following data: Col1 Col2 A X A Y A Z B X B Y B Z C Z I need to receive the following result: Col1 Col2 A X B Y C Z In other words: For each value in the left column, I need to ...
0 votes
1 answer
64 views

I have a table that includes a total debt and an annual repayment rate, payment start date and a calculated value for the first years prorata payment. I need to create/amend the table so that the ...
1 vote
2 answers
58 views

I have a slowly changing table,a new row is created each time any of the source fields are changed. Some metadata is added to show when that version was valid. This is a simplified example(dates are ...
0 votes
1 answer
40 views

/* Stored Procedure April 30, 2021 Mohamad Chaker */ USE CIS111_BookStoreMC GO --drop the procedure IF OBJECT_ID('spAssetInfo') IS NOT NULL DROP PROC spAssetInfo GO --Create the stored procedure ...
0 votes
0 answers
31 views

I found this question, which presents the same situation. Trying to do a set-based update, and the table to be updated matchesmultiple rows in the table being used for update values. A minimal example ...
0 votes
1 answer
174 views

I have three tables in MsSQL to store data. First one is the Children contains the following rows ID, Name, Age, FatherID, SchoolID The second one contains the data of their fathers, like this ...
2 votes
3 answers
275 views

I have a table that stores patient lab test results. There can be results from multiple tests like Albumin, Potassium, Phosphorus etc. First reading for each patient from each of these categories is ...
LCJ's user avatar
  • 22.8k
0 votes
1 answer
76 views

I have an SP that creates and runs a SQL query. The end result is used for some reporting. This query though takes a long time to run (greater than 30 seconds is a long time and sometimes goes for ...
Mike's user avatar
  • 1,924
1 vote
1 answer
8k views

I wonder if anybody can please confirm the expected behavior of PostgreSQL Inlining? From the Microsoft SQL world, any function which is determined to be inline, will be used in a single iteration ...
0 votes
1 answer
259 views

I have the tables Cities and Countries with the following triggers: When I update any City, it should insert a row into the Audit table saying 'The City with ID 'any ID' has been modified'. Cities ...
2 votes
2 answers
78 views

Edit: I realized I asked the question wrong. What I really meant to ask was, "given a set of values for [Column B], check if there is a value in [Column A] that matches all of the set and no others." ...
mbm29414's user avatar
  • 11.6k
0 votes
2 answers
87 views

Couldn't find anything on this, using set-based operations. Not sure if I'm on the right track, but I have 2 guesses on how to do this, but I'm not sure if I'm even close, or if MINUS is the right set-...
-1 votes
1 answer
118 views

I am working with a large SQL table, 186 columns, 257899 rows, and counting. It gets added to every time something is changed in the main data. This is part of the shadow tables that allow us to see ...
Mike's user avatar
  • 1,924
1 vote
2 answers
725 views

I seem to approach thinking about sql the wrong way. I am always writing things that do not work. For example I need a variable. So i think: DECLARE @CNT AS INT SET @CNT = COUNT(DISTINCT database....
1 vote
1 answer
225 views

I have a database set up to store all the input from every web form that I have created that looks like this: (FormData) ---------------------- (PK) Id int not null, (FK) FormFieldId int not null, (...
A.Stekl's user avatar
  • 135

15 30 50 per page
1
2 3 4

AltStyle によって変換されたページ (->オリジナル) /