Viewing 15 posts - 5,176 through 5,190 (of 7,597 total)
Use an AFTER trigger(s) for both INSERT and UPDATE.
April 16, 2015 at 1:47 pm
For example:
--USE [<your_db_name_here>] --naturally make sure you are in the right db
SET DEADLOCK_PRIORITY LOW --probably irrelevant, but just in case
DECLARE @list_missing_indexes bit
DECLARE @table_name_pattern sysname
--NOTE: showing missing indexes can take some...
April 16, 2015 at 1:08 pm
You will need to look at least at the stats SQL provides for indexes:
1) missing index stats and
2) index usage stats.
Between those and you knowledge of the table, we...
April 16, 2015 at 1:07 pm
Lowell (4/16/2015)
Talib123 (4/16/2015)
They believe it will improve...
April 16, 2015 at 11:04 am
Someone's apparently discovered an obscure bug that's being repeated here. Software bugs are just bugs, we can't "explain" them.
April 16, 2015 at 10:05 am
There are many, many times when the PK should not be the clustered index. Why do you think it should be changed??
April 16, 2015 at 9:10 am
You're welcome. The really great thing is that that code still works perfectly if/when you convert the column itself to datetime (or date) ... nice!
April 16, 2015 at 8:18 am
You want to use the current index where possible, so do this:
select MRN, Name, AppointmentDate
from DATA
where datetime >= '2015-04-01 00:00:00.000'
and datetime < '2015-05-01 00:00:00.000'
April 15, 2015 at 2:14 pm
Detach now (since SQL 2005, IIRC) changes the security on the files -- this is an intentional thing by MS, as a "security feature". But it's been a royal...
April 15, 2015 at 2:11 pm
You check for a "GLOBAL" cursor but you don't explicitly specify a GLOBAL cursor when you DECLARE it. Whether a cursor is local or global can vary based on...
April 15, 2015 at 2:07 pm
You should look into RCSI as well. That may solve your issue even more completely and with less effort during coding :-).
April 14, 2015 at 3:11 pm
CREATE FUNCTION [dbo].[CheckLoginDetails_Username] (
@SuppliedUsername nvarchar(150),
@SuppliedPassword nvarchar(150)
)
RETURNS bit
AS
BEGIN
RETURN (
SELECT CASE
...
April 14, 2015 at 1:00 pm
Maybe a join to reduce repetition of comparisons:
SELECT bf.BF_ORGN_CD, bf.BF_BDOB_CD, bf.BF_TM_PERD_CD, bf.data
FROM BF_DATA bf
INNER JOIN (
VALUES('A1', 'B1', 'C1'),
...
April 14, 2015 at 9:56 am
There used to be both recoverability and performance reasons for the split. Now it's more about recoverability than performance.
If possible, you want the data and logs on separately "fail-able"...
April 14, 2015 at 9:49 am
Eirikur Eiriksson (4/13/2015)
ScottPletcher (4/13/2015)
Eirikur Eiriksson (4/13/2015)
ScottPletcher (4/13/2015)
April 14, 2015 at 8:09 am
Viewing 15 posts - 5,176 through 5,190 (of 7,597 total)