Viewing 15 posts - 1,396 through 1,410 (of 6,679 total)
FYI - I modified the query and removed the max_end column(s) as that isn't needed since we are now using @max_id.
January 11, 2021 at 9:56 pm
In Oracle - I wouldn't use this structure at all. I would generate a sequence as needed using INTERVAL - and of course, dual. But then again I haven't done...
January 11, 2021 at 8:14 pm
This appears to be a design issue - not really a coding issue. The design should be modeled on a header/detail type model - where you have a table (and...
January 11, 2021 at 8:04 pm
This will need to be tested with many more rows/conditions - but should get you started:
SELECT iif(B1 < A1, B1+A1+(max(A1) over()-A1), B1) - A1 FROM CTE
I assumed...
January 11, 2021 at 7:58 pm
Here are the modifications:
Declare @orderCodeSets Table (order_id int, code_type varchar(20), start_id int, end_id int);
Insert Into @orderCodeSets (order_id, code_type, start_id, end_id)
Values (1, 'all_code_sets', 1, 20000)
...
January 11, 2021 at 7:40 pm
You can add two more tables in the itally. That should generate more than enough rows.
As for performance, that needs to be tested.
We can shortcut the number of rows generated,...
January 11, 2021 at 7:29 pm
Here is my take:
Declare @orderCodeSets Table (order_id int, code_type varchar(20), start_id int, end_id int);
Insert Into @orderCodeSets (order_id, code_type, start_id, end_id)
Values (1, 'all_code_sets', 1, 100)
...
January 11, 2021 at 6:42 pm
There is no reason to set anything there for SQL Server - if the SQL Server service fails you really don't want it attempting to restart multiple times and possibly...
January 11, 2021 at 5:13 pm
Thanks I thought of that. But there are few more differences in where so let it go.
I don't see those 'few more differences' in the code...the following could replace...
January 11, 2021 at 4:51 pm
I guess I am not seeing the problem - wouldn't just using TOP 1 with ORDER BY Cond desc return that one row? Why the need for a case expression?
Unless...
January 10, 2021 at 5:28 pm
p.s. The reason why I brought the subject up is because the "condition" we're talking about is that Inserts don't follow the Fill Factor but there is that one...
January 9, 2021 at 3:39 pm
Accessing PHI through a patient portal is much trickier than just granting access to an individual. There are laws (HIPAA in the US) that govern what data can be accessed...
January 9, 2021 at 3:36 pm
Microsoft only supports an OS cluster migration to a version + 1, and that only from Windows Server 2012 R2 and higher. So - you cannot go directly from 2012...
January 9, 2021 at 3:26 pm
The problem is how much data you are trying to push across the network to the secondary instances. The send and redo queues get backed up and that causes the...
January 9, 2021 at 3:00 pm
To get the equivalent of a last_value - you have to be able to define the order that determines first/last. If you can do that - then a simple CROSS...
January 8, 2021 at 6:51 pm
Viewing 15 posts - 1,396 through 1,410 (of 6,679 total)