Viewing 15 posts - 811 through 825 (of 1,419 total)
Here's a tvf
drop function if exists dbo.fn_test_scnd_thurs;
go
create function dbo.fn_test_scnd_thurs(
@test_date date)
returns table
as return
select dateadd(day, 9, calc_dt.dt)...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 30, 2020 at 10:06 pm
I had to take down the previous post because I found a bug in the formula. Looking for how to fix it.
Ah I didn't see what was posted. My...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 30, 2020 at 4:21 pm
Steve, if you're going to use the fnTally function, you need to tell people where to get it. Since I use it so often, I just put the link...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 30, 2020 at 4:16 pm
Even if fnTally is not available it's still a useful article to read. Any table with reliably more than 31 rows could be used tho. In this case I created...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 30, 2020 at 4:13 pm
When you write "which is followed with..." it seems you're intending it to mean "which follows the..."? The following has 2 Common Table Expressions: 1) 'test_tues_cte' which contains all of...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 30, 2020 at 2:00 pm
The JSON is oddly formed. Are you 100% sure this is the format required? The inner JSON items are in array list format but there's no array wrapper. I don't...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 28, 2020 at 2:04 pm
One way or another I would like to come up with a way to deal with JSON schemas. If I observe how my time is spent and do the "5...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 25, 2020 at 6:59 pm
but my point is that I don't want to assign a value to a variable to start creating hierarchies for all accounts in my chart of accounts. Any ideas...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2020 at 6:31 pm
Well, I'm not really experienced with hierarchyid other than fiddling around with it. Most of what can be accomplished with hierarchyid can also be done in various other ways. In...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2020 at 1:05 pm
with t2_latest_cte as (
select *, row_number() over (partition by RunDate
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 19, 2020 at 4:30 pm
When I run each query and include the actual execution plan the results are identical. Both do one table scan and a constant scan on the results. So yes they...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 18, 2020 at 7:29 pm
drop table if exists #Customer
go
create table #Customer(
CIDint not null,
WholeSaler bit not null,
ReSalerbit not...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 18, 2020 at 3:57 pm
select year(eomonth(getdate(),-1))
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 17, 2020 at 8:26 pm
Thanks for the suggestions. I am still curious to know why the MERGE statement deadlocks though. Any ideas?
The way to restrict the number of rows the MERGE is applied...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 17, 2020 at 3:13 pm
Since you're counting across months the quick way to generate the daily rows would be to use a tally function. This uses dbo.fnTally which see this link for details. ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 15, 2020 at 11:02 pm
Viewing 15 posts - 811 through 825 (of 1,419 total)