Viewing 15 posts - 5,431 through 5,445 (of 7,597 total)
Or:
EXEC sp_helptext 'derived.Case_Times'
January 22, 2015 at 9:53 am
You don't reorg/rebuild every index every week do you? You do have some type of check so that you rebuild only tables that are severely fragmented?
If you're already doing...
January 22, 2015 at 9:17 am
It's not a function, as there are no parentheses, (), after its name.
This code will tell you what it is, in the "type_desc" column:
SELECT o.*
FROM sys.objects o
WHERE
...
January 22, 2015 at 9:14 am
Jeff Moden (1/19/2015)
ScottPletcher (1/19/2015)
January 20, 2015 at 8:12 am
Jeff Moden (1/19/2015)
ScottPletcher (1/19/2015)
January 20, 2015 at 8:08 am
You could also defer decoding/lookup until after the counts are computed. This might make the final query more "natural-looking":
Select
age.[10_Year_Age_Band],
epi.count
From (
...
January 19, 2015 at 3:58 pm
If you are on Enterprise Edition, you can do online rebuilds of most indexes, depending on the data types appearing in the index.
January 19, 2015 at 3:45 pm
For best overall performance, review "missing index" and index usage stats from SQL Server, then determine first and by far the most important: do you have the best clustered index...
January 19, 2015 at 3:44 pm
I still see no reason to risk @@ROWCOUNT if you just want to know if a row was modified or not -- that easy enough to check with EXISTS(), which...
January 19, 2015 at 2:03 pm
Jeff Moden (1/19/2015)
ScottPletcher (1/19/2015)
January 19, 2015 at 1:49 pm
Do not use INFORMATION_SCHEMA.* views in SQL Server. They are very slow compared to sys.* views and seem to cause much more locking/deadlocking. Based on research, it seems...
January 19, 2015 at 9:29 am
@@ROWCOUNT is no longer reliable in triggers and should not be used to determine if/how many rows were affected. You have an easy alternative anyway, since you just want...
January 19, 2015 at 9:26 am
You could check for ascii 0 in a the column like so:
WHERE
col1 LIKE '%' + CHAR(0) + '%'
January 16, 2015 at 3:18 pm
TheSQLGuru (1/16/2015)
Where ltrim(rtrim(col1)) = ''
I see this code ALL THE TIME at clients. Can someone tell me why both would be needed?? 😎
Why would either be "needed"? Just...
January 16, 2015 at 3:16 pm
halifaxdal (1/16/2015)
Lowell (1/16/2015)
halifaxdal (1/16/2015)
no way i know of to ignore errors, you have to explicitly use LEFT functions in the SELECT or something to work around this issue.
based on your...
January 16, 2015 at 3:11 pm
Viewing 15 posts - 5,431 through 5,445 (of 7,597 total)