Viewing 15 posts - 1,126 through 1,140 (of 1,424 total)
drop table if exists #EMployeeStatus;
go
create table #EMployeeStatus(
EMployeeID Int,
TranDate datetime,
OldStatus varchar(50),
NewStatus varchar(50));
go
insert #EMployeeStatus(EMployeeID, TranDate, OldStatus, NewStatus) values
(12345657, '07/11/2018', 'SUSPENDED', 'ACTIVE'),
(12345657,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 25, 2020 at 12:19 pm
select * from sys.database_scoped_configurations;
This tells the settings. Since for a while identity_cache ON has been the default. I checked Azure Sql is set to ON by default. ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 24, 2020 at 5:45 pm
In the DDL provided:
[event_id] [float] NULL
[race number] [tinyint] NULL
Are these 2 of the 3 columns to be included in the ORDER BY? Which column corresponds to expr1003?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 24, 2020 at 5:25 pm
Sorry I should've also asked which are the ORDER BY column(s)? The window has 2 parts 🙂
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 24, 2020 at 4:51 pm
basically what I need to do is to summarize the count of column "count2" for a every partition, and then subtract it to the field in "lead2" so, with...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 24, 2020 at 4:12 pm
This uses the daterange function from this article: https://www.sqlservercentral.com/scripts/a-daterange-table-valued-function
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 23, 2020 at 5:06 pm
drop table if exists #tblTest;
go
create table #tblTest
(ename varchar(10),
Amount float,
eDate date);
go
insert #tblTest values
('ABC',615.00,'03/23/2020'),
('ABC',540.00,'03/23/2020'),
('ABC',207.00,'03/23/2020'),
('PQR',449.00,'03/23/2020'),
('PQR',1065.00,'03/23/2020'),
('PQR',-2435.00,'03/23/2020');
declare
@max_dt ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 23, 2020 at 5:05 pm
Afaik and imo there are no pros only cons. There is no such thing as a "gap" in a primary key because 'unit consistency' is not a necessary...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 23, 2020 at 4:37 pm
Afaik and imo there are no pros only cons. There is no such thing as a "gap" in a primary key because 'unit consistency' is not a necessary attribute. Maybe...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 23, 2020 at 1:18 pm
I prefer to always use INNER and OUTER for clarity.
Clarity could not also come from conciseness? It seems to me adding extra information which is of questionable necessity adds...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 9:10 pm
Steve and Jeff, thank you. Good to have other eyes on this. 🙂 What should I do with the earlier incorrect code? Wipe it out? Should I have kept updating...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 8:33 pm
If dupes are ok but the alerttypeid may only be in (4, 6), then maybe this works
with only_two_cte(alertid) as (
select
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 7:54 pm
with only_two_cte(alertid) as (
select
alertid
from
#aaa
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 7:43 pm
Ok yeah I'm starting to see the alerttypeid's should be counted separately.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 7:38 pm
with only_two_cte(alertid) as (
select
alertid
from
#aaa
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2020 at 7:03 pm
Viewing 15 posts - 1,126 through 1,140 (of 1,424 total)