Viewing 15 posts - 2,386 through 2,400 (of 2,610 total)
francesco.mantovani - Wednesday, April 12, 2017 3:09 PMThis is exactly what I was looking for!
You saved me a lot of work
There is...
April 12, 2017 at 5:44 pm
Just thought I'd try this, I noticed that the description says "The second CTE, named L1, uses the BaseNum CTE to generate a second result set with one thousand rows....
March 30, 2017 at 4:46 am
You could do it with global temporary table and drop it after you've finished with it.
declare @sSql as nvarchar(1000)
declare @GuidTableName as nvarchar(50)
set @GuidTableName = NEWID()
set @sSql='set nocount on;;with...
April 6, 2016 at 5:06 pm
And does this return anything in any of the date columns?
SELECT T.name, I.name, U.*
FROM sys.tables T
INNER JOIN sys.dm_db_index_usage_stats U
ON U.OBJECT_ID = T.OBJECT_ID
INNER JOIN sys.indexes I ON...
March 7, 2016 at 10:13 am
What index does the execution plan say it uses when you access it?
March 7, 2016 at 10:02 am
dlchase (3/7/2016)
I got nulls in the last accessed column for about half of the tables in a database and I know many of them have been accessed daily.
If the table...
March 7, 2016 at 9:47 am
Nice script, thank you.
Table Value Constructors were introduced in SQL 2008, so this script doesn't work with versions below that. I've rewritten the query inside the function so it will...
March 7, 2016 at 5:24 am
.
February 12, 2016 at 4:58 pm
Ed Wagner (1/31/2016)
Jonathan AC Roberts (1/31/2016)
CAST(LEFT(OMD, 8) as datetime) + 30 < GETDATE();
This is not good practice, I'm not sure it will even work in versions of SQL Server...
January 31, 2016 at 4:20 pm
CAST(LEFT(OMD, 8) as datetime) + 30 < GETDATE();
This is not good practice, I'm not sure it will even work in versions of SQL Server later than 2005.
You should be...
January 31, 2016 at 1:18 pm
If it is parameter sniffing causing the problem then you can just alter the stored procedure to copy the parameters passed in into ones created within the SP.
Example:
GO
CREATE PROCEDURE mySPWithParameterSniffing
(
...
November 26, 2015 at 12:39 pm
Instead of
WHERE Primary_Diagnosis between 'C00%' and 'C14%'
Just have :
WHERE Primary_Diagnosis >='C00'
AND Primary_Diagnosis <= 'C1499999'
October 7, 2015 at 7:51 pm
I would try two compound indexes on the Message table.
CREATE INDEX IX_Message ON [Message](Value asc ,TypeId asc )
CREATE INDEX IX_Message_1 ON [Message](GroupId asc ,TypeId asc)
This should make the query...
October 6, 2015 at 8:28 am
keyurgondalia (9/13/2015)
September 13, 2015 at 6:36 pm
carbogast (3/6/2013)
September 7, 2015 at 5:42 am
Viewing 15 posts - 2,386 through 2,400 (of 2,610 total)