Viewing 15 posts - 826 through 840 (of 1,424 total)
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
It's impossible to say with certainty but perhaps there's another process which causes locking?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 14, 2020 at 1:37 pm
Maybe you're looking for something like this
Declare @PalletContent table (ID int,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 14, 2020 at 1:21 pm
If the MERGE throws an exception is there a rollback? Could you post the whole procedure? Is the lock still an issue or it's inconsistent? Broken MERGE statements are a...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 13, 2020 at 5:56 pm
Receiving JSON and putting it in SQL tables (and the reverse) is pretty much what my job entails these days. It seems like there ought to be an SSIS way...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 11, 2020 at 3:27 pm
Step 1 could be to summarize by the concatenation of MODEL and VARIANT. Then further summarize by year (årgang) and use STUFF+FOR XML to aggregate the concatenation of MV_ANTAL and...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 11, 2020 at 3:03 pm
Hi there -- thank you for the points 🙂 It wasn't clear to me it's OK to use the uniqueid to order the results. Windowing functions are permitted in the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 11, 2020 at 12:31 pm
My answer was posted on Stack Overflow. It assumes as little as possible about your data. The final result isn't in the same order as the example output because...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 10, 2020 at 8:56 pm
A non-dynamic crosstab query to produce the output above could be something like this
with names_cte as (
select *, row_number() over (partition by department,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 2, 2020 at 7:11 pm
Are the names within departments in any particular order?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 2, 2020 at 5:45 pm
My goal is to come up with questions
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
October 30, 2020 at 9:37 pm
Viewing 15 posts - 826 through 840 (of 1,424 total)