Viewing 15 posts - 1,006 through 1,020 (of 1,424 total)
select
a.[name],
sum(iif(b.gender='M', 1, 0)) m_count,
sum(iif(b.gender='F', 1, 0)) f_count
from
#department a
join
#employee b on a.departmentID = b.departmentID
group by
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 25, 2020 at 1:50 pm
.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 24, 2020 at 9:44 pm
There's a lot going on in the code which could be looked at. Instead of EXEC(@qry) where the parameters are strung together it could be parameterized using sp_executesql. In terms...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 18, 2020 at 5:09 pm
To get SQL Server to ignore and continue is possible from a script or procedure by executing another (or more...) stored procedure which contain try/catch where the error is output...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 18, 2020 at 12:56 pm
Can you write it without the function?
In theory it should be possible but maybe not easily. The tvf is parameterized so I think to remove it would require splitting...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 17, 2020 at 2:27 pm
The query could be without the cte
select
t1.id, cast(t1.startdate as date) startdate, cast(t1.enddate as date) enddate, cast(td.enddate as date) range_end_dt
from
dbo.test_1 t1
cross apply
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 17, 2020 at 1:27 pm
The OP wrote: "output is expected as if member is continuously enrolled without any gap in enrollment get min and max and if there is enrollment gap leave as is." ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 17, 2020 at 11:36 am
To resolve for arbitrary relationships in the data requires hierarchical recursion, no? The OP's question and Phil's too
drop table if exists dbo.test_1;
go
create table dbo.test_1(id int,startdate datetime ,enddate...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 16, 2020 at 5:52 pm
drop table if exists dbo.test_T1;
go
create table dbo.test_T1(
ID1 varchar(8) not null,
ID2 varchar(8)...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 11, 2020 at 12:15 pm
In 2016 there are some nice built in features to support time zone conversions
/* the list of time zones your instance supports */
select * from sys.time_zone_info;
declare
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 8, 2020 at 7:15 pm
this
declare @frDate date='2020-03-31';
with a_cte(DocType, Debit, Credit, Account, Mdate) as
(select 'TC', 10, 20, 123, '2020-03-30'
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 31, 2020 at 4:11 pm
In this i want to add condition if @frdate Month = 3 and Date = 31 ...
That's what the OP wrote but is it what they meant? 🙂 Idk
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 31, 2020 at 4:04 pm
Try adding this to your WHERE clause:
AND NOT (
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 31, 2020 at 3:40 pm
As separate statements maybe something like this
set xact_abort on;
begin transaction;
begin try
update g
set
[skuId] =...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 28, 2020 at 11:18 pm
Some code to look at?
And what does this sentence mean... "It isn't (and wasn't) possible to access the request route values from within the program delegate." ?...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 26, 2020 at 5:59 pm
Viewing 15 posts - 1,006 through 1,020 (of 1,424 total)