Viewing 15 posts - 181 through 195 (of 1,468 total)
You are on the right track.
SELECT t.Testid
, t.Status
, t.Startdate
, EndDate = DATEADD(dd,...
Your expected output is inconsistent.
That said, I believe that you need to look at the LAG function.
I would add a priority field and add it to the order by.
So, using Scott's code, it would now look like this ...
SELECT d.ID, ca1.Amt, ca1.AmtReason
FROM #data...
I know nothing of JSON, but this looks like it is doingwhat you are trying to do
https://docs.microsoft.com/en-us/sql/t-sql/functions/json-modify-transact-sql?view=sql-server-ver15
This looks like you are trying to create a catch-all query. You are on a slippery slope.
I have never worked with geometry data types before, but after a quick google,...
Is there a difference in using an alias using the AS keyword as opposed to what you have done here for the Prev_end and Numday lines?
Functionally, there is no...
In order to help us to help you, please provide data in readily consumable format (like this)
IF OBJECT_ID( 'TempDB..#Data', 'U' ) IS NOT NULL
DROP TABLE...
You need to GROUP BY v.PatID, v.ProcValDate
Below is an expanded data set, with options to add "RN" by both the DateTime, and just the Date
IF OBJECT_ID( 'TempDB..#value',...
You are correct in assessment of the field def....a catch all... so how in CODE based upon what I supplied can it be fixed?
Thanks.
The only way to get rid...
Viewing 15 posts - 181 through 195 (of 1,468 total)