Viewing 15 posts - 676 through 690 (of 3,011 total)
Lowell (12/9/2011)
this trick of adding the # minutes to the minimum sql date will trucate to the last minute that occurred:
select DATEADD(minute, DATEDIFF(minute,0,getdate()), 0)
Your code works, provided the date is...
December 9, 2011 at 8:25 am
The following links have functions that will find the start of Century, Decade, Year, Quarter, Month, Week, Day, Hour, 30 Minutes, 20 Minutes, 15 Minutes, 10 Minutes, 5 Minutes, x...
December 9, 2011 at 8:15 am
Did you change the database where you are still seeing the deadlocks to Read Committed Snapshot?
December 7, 2011 at 3:33 pm
This doesn't sound like a very good plan if you are just going to update the partition column, since it would force the data to move physically form one disk...
December 6, 2011 at 3:29 pm
Revenant (12/5/2011)
Michael Valentine Jones (12/5/2011)
Michael Valentine Jones (12/3/2011)
December 6, 2011 at 3:13 pm
Refer to the Litespeed help for other options:
-- Sample Litespeed Database Restore Command
exec master.dbo.xp_restore_database
@database = 'MyDBName'
, @filename = '\\MyServer\MyShare\MyDirectory\MyDBName_db_201111060700.BAK'
, @with = 'stats = 5'
, @with = 'NORECOVERY'
, @with = 'move...
December 6, 2011 at 11:06 am
Michael Valentine Jones (12/3/2011)
December 5, 2011 at 7:50 pm
The worst abuse is when they set short project deadlines without any attempt to match the workload to the available staff, and then expect people to work extremely long hours...
December 3, 2011 at 11:17 pm
Jeffrey Williams 3188 (12/2/2011)
Select dateadd(month, datediff(month, -1, cast(@year as char(4)) + '-' + cast(@month as varchar(2)) + '-01'), -1)
That code is sensitive to the setting of DATEFORMAT. In the...
December 3, 2011 at 10:46 pm
You might find the function on the link below useful for what you are doing.
Finding the midpoint between two datetimes
The function in this script finds the midpoint in time...
December 3, 2011 at 12:44 am
There is a very good chance that you can eliminate the deadlocks without making any code changes by setting the database to read_committed_snapshot.
ALTER DATABASE [MyDatabase] SET READ_COMMITTED_SNAPSHOT ON;
You should read...
December 3, 2011 at 12:36 am
There is a good chance that you will not see any performance improvement from physically defragging the database files.
If you still want to, you can use Diskeeper to defrag the...
December 3, 2011 at 12:25 am
This is probably the fastest and shortest method for finding the last day of the month, given the year and month as integers, since it uses only a single DATEADD...
December 2, 2011 at 4:55 pm
No, you would need access to the source code repository that was used to build the assembly.
December 1, 2011 at 4:13 pm
Just to make sure you understand a couple of points:
1. Dynamic SQL (including sp_executesql) is not allowed in a TSQL function. If you need to use it, code it...
December 1, 2011 at 4:10 pm
Viewing 15 posts - 676 through 690 (of 3,011 total)