Viewing 15 posts - 1,261 through 1,275 (of 1,424 total)
The S in SCD is "slowly" so I don't see much benefit either. Also, afaik this feature is not available in SQL DW.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 28, 2019 at 3:25 pm
Unless you are required to do this by law, it's more trouble than it's worth. If you absolutely have to do it, I would use a SEQUENCE and run...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 27, 2019 at 9:38 pm
Either by querying your own table or by storing the maximum sequence per day somewhere. Fyi, this is really not a good way to handle keys and is not recommended. ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 27, 2019 at 8:10 pm
I don't see where you used a GUID either in the original post nor here as a part of the formula. To be sure, what you did with the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 27, 2019 at 6:46 pm
With 550 columns it's not possible to test every combination of 2 or more columns to see if they are unique. It's a combinatorial problem with a search space...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 27, 2019 at 3:36 pm
I'm pretty sure that the system times captured by temporal tables are in the DATETIME2(7) level of precision. What else would you need?
Yea right, it's super precise so it's...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 26, 2019 at 9:30 pm
If the number of candidate columns is small you could exhaustively test the possible combinations using a cursor and dynamic sql.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 26, 2019 at 8:45 pm
It seems like you're talking about two things here. Not sure what temporal tables have to do with the tokens. Usually you are hashing somehow to create this token...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 26, 2019 at 7:43 pm
one code should not be shared to other user. while they try to get the code simultaneously, code should not be shared.
Suppose you have 3 people and each has...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 25, 2019 at 4:59 pm
What Jeff wrote is enough to scare me away from even trying this approach. Using internal locking could enable end-users to do things which produce unpredictable performance. You wrote "users...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 22, 2019 at 1:22 pm
When there no uncommitted transactions do the EMpbasetable and EmpIncTable have the same number of rows?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 21, 2019 at 2:21 pm
Here's a similar way that's maybe simpler.
with x_cte as (
select
*,
row_number() over (partition by recid order by docdate desc) row_num
from
#tmptbl
where
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2019 at 11:39 pm
Here is another option:
With groupedDates
As (
Select t.recid
, t.docdate
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2019 at 10:16 pm
declare
@docdatedate='2019-08-09';
with
range_cte(recid, docdate, nxt_dt, nxt_dt_diff) as (
select
t.*,
lead(t.docdate, 1) over (partition by recid order by docdate desc) nxt_dt,
datediff(dd, lead(t.docdate, 1) over...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2019 at 7:23 pm
Ok issue is the initial nxt_dt_diff is not equal to 1. Or the code doesn't handle that properly now. I'll update it.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2019 at 7:09 pm
Viewing 15 posts - 1,261 through 1,275 (of 1,424 total)