Viewing 15 posts - 3,451 through 3,465 (of 7,191 total)
Rebecca
Here's one way: select distinct columns from the table, use row_number() on that, then join back to the table.
John
August 6, 2014 at 9:32 am
I'm not sure what your question is, but a date column is often a great candidate for an index - even a clustered index. You'll want to weigh the...
August 6, 2014 at 9:08 am
(1) In the absence of any flow control logic (GOTO commands etc), the second command will start when the first has finished, and so on.
(2) A deadlock will cause one...
August 6, 2014 at 9:00 am
That syntax you use in your UPDATE doesn't look right. I've certainly never seen it done like that before. Here's how I'd have done it:
UPDATE i
SET Name =...
August 4, 2014 at 9:47 am
OK, so your statistics on sales_fact are more than five weeks out of date. Please update all statistics on that table with FULLSCAN, run the query again, and post...
August 4, 2014 at 8:55 am
Hmmm.. I saw where he said "the stats were run 3 weeks back", which doesn't sound very up to date to me. I think you're right - a bit...
August 4, 2014 at 7:49 am
Also, when was the last time you updated your statistics? There are massive discrepancies on some of those index seeks between estimated and actual number of rows. Please...
August 4, 2014 at 7:15 am
Oof! Good spot, Lynn. I wrote that script years ago when it still had to work against SQL Server 2000. I'll update my package at the next...
August 1, 2014 at 9:33 am
Some performance counters are further divided in instances, so the % Processor Time counter is divided into one instance for each processor you have, and the Avg. Disk sec/Read counter...
August 1, 2014 at 8:47 am
If your query is quite simple, then something like the code below will work.
BEGIN TRY
EXEC('SELECT name FROM sys.databased')
END TRY
BEGIN CATCH
EXEC('SELECT name FROM sys.databases')
END CATCH
If it's a bit more complex, you're...
August 1, 2014 at 8:31 am
You certainly don't need a cursor, as others have shown you. However, may I suggest you approach this from a different angle? It's all very well checking you...
August 1, 2014 at 8:13 am
You can use DATEPART to get the hours, minutes, seconds and milliseconds components from the date, and build your decimal number from there.
John
July 31, 2014 at 9:47 am
OK, now why do you want to convert to decimal? What should the result look like for that date and time?
John
July 31, 2014 at 9:09 am
What precise date and time does that represent? Is i6 16:31:00 on 8th July 2014, or is it 08:16:31 on some day in July 2014?
John
July 31, 2014 at 9:03 am
You can set up an alert in SQL Server Agent based on the Log File Size and Data File Size counters in the Databases performance object.
John
July 25, 2014 at 3:57 am
Viewing 15 posts - 3,451 through 3,465 (of 7,191 total)