Viewing 15 posts - 166 through 180 (of 10,144 total)
CREATE TABLE tableA(December 21, 2018 at 7:31 am
carlton 84646 - Friday, December 21, 2018 6:09 AMThe expected results should look like the following:
This will only take moments...
December 21, 2018 at 6:12 am
December 20, 2018 at 8:56 am
With a lengthy output column list and only a few rows in the result set, this query is made for a key lookup using a skinny index to pack as...
December 20, 2018 at 3:38 am
December 17, 2018 at 6:58 am
LEGALPARCELID |
December 17, 2018 at 6:39 am
Try this, Steve. I've done something similar before:
SELECT MySecurityToken = COALESCE(d.c1, x1.c2, x2.c3, x3.c4)
FROM (SELECT c1 = MAX(something) FROM Table1) d
OUTER APPLY (SELECT c2 = MAX(something)...
December 17, 2018 at 5:30 am
December 17, 2018 at 3:31 am
Run the two UNIONed queries separately to confirm that it’s the lower one which is the pain point. Assuming it is, strip away the...
December 14, 2018 at 4:59 am
-- Step 1: replace all of the subqueries with their APPLY equivalent:December 13, 2018 at 4:29 am
SELECT
d.region,
d.type
FROM (
SELECT
t1.region,
t2.type,
total = COUNT(*) OVER(PARTITION BY t1.typeID)
FROM table1 t1
INNER JOIN table2 t2...
December 11, 2018 at 9:54 am
December 7, 2018 at 9:54 am
Viewing 15 posts - 166 through 180 (of 10,144 total)