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 w ...
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 w ...
Prompt: Show an asset inventory along with the current value (minus 20% depreciation per year). Also show the year when each item will be completely ...
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 ...
I have a table that stores patient lab test results. There can be results from multiple tests like Albumin, Potassium, Phosphorus etc. First reading f ...
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 ...
I wonder if anybody can please confirm the expected behavior of PostgreSQL Inlining? From the Microsoft SQL world, any function which is determined t ...
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 ...
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 su ...
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: Why ...
I have a database set up to store all the input from every web form that I have created that looks like this: I need to query this database to sele ...
Hello I am making a stored procedure and I am having problem outputting the code with a print because later on i need to write the variables to a temp ...
I am in a process on converting a legacy system to web app using Ruby on Rails and MySQL. There are few places that I'm stuck at while converting the ...
I have a table that stores numeric balances in different buckets (bucket 1, 2 and 3). When an amount is posted in the system, the amount must be alloc ...
I have a query that takes one record from #itemtemp, and locates all entries from ReportCSharp that match, inserting those matches into the #link_tabl ...
I have an issue where I am trying to replace the following code with a different solution. Currently I am using a cursor but it is running to slowly. ...
I have two tables: 1) is a list of all parameter-ids and the info to which set of parameters the parameter-id belongs 2) is data that includes some ...
I am using following set based code in sql to calculate the customers bill but it takes 3 Min to performs the operation on 40000 records !!! let me kn ...
My Foo documents have a CustomData collection used to add user-configurable properties. Sometimes, when I create those properties, I'm need to add th ...
I'm trying to better understand set-based logic and simplify a piece of code I'm working on. Here's an example of what I am currently working with (it ...
I want to bring back a result set that returns the beginning effective date and the end effective date for an id with multiple supplier changes. To do ...