Viewing 15 posts - 3,031 through 3,045 (of 7,614 total)
Assuming location is "01", "02", etc., when passed in, then:
Select *
from table_1
Where
ID = @ID
AND Printing = 0
AND Salary =...
December 17, 2018 at 12:21 pm
None of those indexes match the name in the error message.
What is the DDL for index December 17, 2018 at 12:11 pm
select v1.amount,
sum(case when v1.ConfirmedAt is null then 1 else 0 end) as ConfirmNullCount,
sum(case when datediff(day,v1.confirmedat,getdate())<365 then 1 else 0 end)...
December 14, 2018 at 1:22 pm
Extremely vague. But in general, rather than actually SELECTing the data, using EXISTS() to check for it is more efficient.
December 14, 2018 at 1:11 pm
If you wanted to always keep the original temp table, that's fine. I don't have a problem at all with that.
But write the q that way then.
December 14, 2018 at 8:58 am
Float values are not exact, they are approximate. Internally, float 0.55 might be 0.550000000001. CEILING goes up to the next int value no matter how small the amount above the previous...
December 12, 2018 at 3:02 pm
I'm genuinely confused.
Your q states"How can I combine the three queries to one". We write queries that combine the 3 queries into a single query.
But then...
December 11, 2018 at 2:47 pm
December 11, 2018 at 11:15 am
It could be more efficient to get only typeid from table1 in the first pass, like below. This depends on indexing and the cardinality (how many t1 rows have typeids...
December 11, 2018 at 10:43 am
December 11, 2018 at 10:27 am
I'd be concerned with staying within the maintenance window - steps 1 through...
December 10, 2018 at 12:45 pm
Since you're only keeping ~1/6 of the data, you may want to consider a different approach.
Backup up everything (of course!). You might even want to make another copy...
December 10, 2018 at 11:48 am
SELECT [Product Line]
FROM dbo.[Table]
GROUP BY [Product Line]
HAVING MAX(CASE WHEN [Business Unit] = '' THEN 1 ELSE 0 END) = 1 AND
MAX(CASE...
December 7, 2018 at 10:57 am
If there is any (non-filtered) index keyed first on id, then MAX(id) will do an index seek/lookup. Internally it could officially be a scan, but it will be a scan...
December 5, 2018 at 10:18 am
Viewing 15 posts - 3,031 through 3,045 (of 7,614 total)