Viewing 15 posts - 1,441 through 1,455 (of 1,492 total)
I did this too quickly but maybe it will give you an idea. (Also it is not surgable).
SELECT
S.Supplier,
SL.StockLevel,
CASE...
March 18, 2014 at 1:43 pm
GilaMonster (3/18/2014)
djj (3/18/2014)
If I do a BEGIN TRAN I need to do either a ROLLBACK TRAN or a COMMIT TRAN.
Yes
How do I now if there is an uncommited transaction?
Check the...
March 18, 2014 at 7:00 am
Not sure where I got this:
-----------------------------------------------------------------------------------------
-- Database free space
-----------------------------------------------------------------------------------------
IF OBJECT_ID('tempdb..##DatabaseSize') IS NOT NULL DROP TABLE ##DatabaseSize;
CREATE TABLE ##DatabaseSize
(
DatabaseName sysname,
Name...
March 17, 2014 at 10:17 am
As stated this is part of the code I use to generate UPDATE STATISTICS command that I run manually. And since I did not create the indexes, I do...
March 17, 2014 at 5:40 am
Might also try:
Select * from Production
where ISNULL(DeviceName,'Keyboard') = 'Keyboard'
and Owner = 'Mark'
however, this does not use an index for DeviceName.
March 17, 2014 at 5:27 am
Here is part of the logic I use to refresh statistics:
select Object_name(object_id) AS TableName
, name as StatName
, STATS_DATE(object_id, stats_id) AS statistics_update_date
from...
March 17, 2014 at 5:20 am
Use cte finding the max time stamp into one table and the min timestamp into another. Use COALESCE to insert into a temp table before updating the original
Unfortunately I...
March 13, 2014 at 12:27 pm
It seems to work for us.
March 11, 2014 at 12:17 pm
If the value stop_execution_date is null in msdb.dbo.sysjobactivity the job is running.
March 10, 2014 at 1:04 pm
Why not modify the first query to LEFT JOIN to msdb..Sysjobhistory?
March 10, 2014 at 8:41 am
We use views as the access point for users. (outside of company application) . This way we can limit the columns seen and just give readonly access to...
March 6, 2014 at 1:47 pm
Just get your MAX as normal then add criteria to limit the range.
Please show what code you have so far.
March 6, 2014 at 10:15 am
Erland Sommarskog (3/6/2014)
March 6, 2014 at 10:13 am
I am old school. I have a folder that I keep code in. If I need to find something and cannot remember which sub folder, I do a...
March 6, 2014 at 5:19 am
Viewing 15 posts - 1,441 through 1,455 (of 1,492 total)