Viewing 15 posts - 541 through 555 (of 1,396 total)
I just ran into this same issue. The short answer is to create a #temp table instead and it works (because the temp table exists within the same execution context...
October 2, 2021 at 11:49 am
I was off topic??
The other comment. Your comment was very on topic 🙂
October 1, 2021 at 2:57 pm
Wow, what a way to respond to an obvious joke.
Off topic much? A couple is 2 and a few is 3 and more than a few is 5 but...
October 1, 2021 at 1:19 pm
Well a lot could said about this topic. The classic threaded forum/subforum organization might seem straightforward it depends on many things. If by "threaded" it means "nested html" then that's...
October 1, 2021 at 4:14 am
Maybe you could use a CTE to make sure the right table source of the JOIN in the UPDATE statement contains appropriate unique priorityCode's
with unq_priority_cte(priorityid,priorityCode,priorityname) as (
...
September 30, 2021 at 12:16 pm
Steve Collins wrote:this looks familiar
I think both windowed and brute force approaches have their place. I have just tidied up my code to try and make it more understandable:
It...
September 29, 2021 at 7:46 pm
Ken McKelvey this looks familiar
https://www.sqlservercentral.com/forums/topic/need-to-create-gaps-in-a-table-of-date-ranges
Again one "brute force" way to do this would be to expand all the date ranges and use the set operator EXCEPT to remove the (also...
September 28, 2021 at 10:01 pm
It's a one time only type query or it's intended to be run frequently? The id value in the last row of the sample data should be 5, no?
September 28, 2021 at 8:20 pm
O sorry, I was thinking you meant 2nd from the end. I seemed to have missed the date range part too
declare @StartDate DATE = '2021-09-24', @EndDate DATE...
September 27, 2021 at 6:08 pm
You could try using ROW_NUMBER twice. Once to find the most recent row within the MyIdentifier partition and then again to find the 2nd oldest row (also within the MyIdentifier...
September 27, 2021 at 5:20 pm
Call it what you want, using a GUID to "represent the PK" or vice versa makes no sense to me. Both columns are fixed width (unless you've done row...
September 26, 2021 at 10:53 pm
Maybe it was incorrect to label the GUID column 'guid_id' because it was intended as a public attribute of the primary key. Maybe it would be better labelled as 'securitystamp'...
September 26, 2021 at 9:35 pm
Thank you Jeff. On some projects we've had logical/physical GUID issues (or idk what to call it, let's say it's the subject of ongoing analysis) which we've sort of managed...
September 26, 2021 at 6:50 pm
So, they came up with a workaround as below.
- Introduced a new column as BIGINT column.
- Made the bigint column as NOT NULL IDENTITY(1,1) with clustered index on it
-...
September 26, 2021 at 1:16 pm
Good idea but I'm hoping that you don't think that I didn't know that. 😀 It doesn't matter as much as it did before but there used to be...
September 25, 2021 at 12:04 pm
Viewing 15 posts - 541 through 555 (of 1,396 total)