Viewing 15 posts - 3,016 through 3,030 (of 7,609 total)
Cluster the [SearchSuggest_QGram_tbl] on [nameCacheId] rather than on gram.
January 2, 2019 at 8:26 am
December 26, 2018 at 10:05 am
SELECT s
s2
,TRY_CAST(s2 AS DATE) AS ScottPDate
FROM @t
CROSS APPLY (
SELECT LTRIM(RTRIM(s)) AS s1
) AS ca1
CROSS...
December 24, 2018 at 8:36 am
I'd add the standard "nocount" setting, but other than that it looks good:
alter trigger trg_up_in_changeflag
on example_table
after update, insert
as
December 19, 2018 at 1:09 pm
December 18, 2018 at 3:42 pm
December 18, 2018 at 3:23 pm
If you're on SQL 2016 (or even SQL 2012), just use TRY_CAST:
SELECT s
,TRY_CAST(s AS date) AS MyDate
FROM @t
December 18, 2018 at 11:12 am
December 17, 2018 at 12:57 pm
December 17, 2018 at 12:49 pm
December 17, 2018 at 12:31 pm
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
Viewing 15 posts - 3,016 through 3,030 (of 7,609 total)