Viewing 15 posts - 1,276 through 1,290 (of 1,424 total)
drop table if exists #tmptbl;
go
create table #tmptbl(
recidint,
docdatedate,
constraint unq_tmptbl_recid_dt unique(recid, docdate));
go
insert into #tmptbl values
(1, '11/16/19'),(1, '11/15/19'),(1, '11/14/19'),(1, '11/13/19'),(1, '10/29/19'),(1, '10/27/19'),
(1, '10/26/19'),(2,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 20, 2019 at 6:29 pm
The two CTE's could be consolidated into one.
with
avg_cte as (
select
t1.PID,
t1.SID,
avg(isnull(t1.TValue/T2.BPrice, 0)) avg_volume
from
#tblData1 t1
join
#tblData2 t2 on t1.SID=t2.SID
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 19, 2019 at 3:51 pm
The weighted average price is still the price. Are you looking for average volumes? Unique constraints on (SID, PID) to tables t2 and t3 are valid for your situation? Assuming...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 19, 2019 at 3:36 pm
The article says: "The typical usage of collections is a multi-valued argument for functions and procedures." True but other solutions exist and are quite useful in comparison to a spatial...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 18, 2019 at 6:10 pm
Merge statements don't have WHERE clauses which is why the target is typically defined in a CTE. In this case there's no CTE so you're merging against the entire DVDB1.Raw.LinkOpportunity...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 14, 2019 at 1:55 am
Besides assigning items like couch, lamps, bed to rooms, ... this UI is a tool to enforce which columns other UI's or database clients can see? So maybe it makes...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 7, 2019 at 7:46 pm
The problem is that the requested parameters are dynamic over the time. And honestly, I can't imagine, in 2019, a DB design requiring view, SP and table update when...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 6, 2019 at 2:35 pm
Is the value column in the T_ROOM_ATTRIBUTES table necessary? Why not delete row(s) (in T_ROOM_ATTRIBUTES) if a room no longer has attribute(s)?
Do you want the target output to always have...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 5, 2019 at 9:53 pm
Note that it says "a query". It is literally, as you say, running one query, not multiple queries. Your representation is a different use case.
Yes one query. Run multiple...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 4, 2019 at 10:23 pm
Nope, just wrong. Multi-version read consistency does not introduce phantom rows - it gives a consistent view of data at a single point in time. Databases are state machines...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 4, 2019 at 9:17 pm
Right they won't see the 11th row because it's no longer the 11th row and displaying it as such is no longer accurate. They will see that row if...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 4, 2019 at 6:43 pm
Or maybe not even locate the page. Just a tally function and table cardinality from dm view.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 4, 2019 at 6:35 pm
This article mentions the "cte trick" to pagination. I wonder how how fast it would be locating the page and then using a tally table on rownums and then without...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 4, 2019 at 5:49 pm
Nadella is a big fan of relational databases. As a business it can't be beat. Who wants to swap it out for something else? Lol (head explodes)
https://www.youtube.com/watch?v=0ey91VaQsOY
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 2, 2019 at 12:14 pm
To split the partial weeks use GROUP BY month. To get the weeks to align with your preferred days use dateadd to move the window. To generate dates this code...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
October 31, 2019 at 3:37 pm
Viewing 15 posts - 1,276 through 1,290 (of 1,424 total)