Viewing 15 posts - 4,531 through 4,545 (of 7,614 total)
Not sure why the "last row" wasn't affected, since that trigger's going to update every row, which you don't want. You need to join to the inserted pseudo-table to...
December 23, 2015 at 11:22 am
CREATE TRIGGER dbo.tr_Question_Details_Update
ON dbo.tbl_RF_Questions
AFTER UPDATE
AS
--if no rows affected, exit.
IF @@ROWCOUNT = 0
RETURN;
SET NOCOUNT ON;
UPDATE CS
SET [ProgramID] = M.ProgramID,
...
December 23, 2015 at 11:19 am
Jeff Moden (12/22/2015)
WhiteLotus (12/21/2015)
Sounds good ..I also notice that all databases autogrowth option are 10% . Should I change all of them ?
If the initial size was 1MB, it takes...
December 23, 2015 at 9:39 am
Sergiy (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 3:56 pm
Sergiy (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 3:56 pm
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 3:50 pm
SELECT "Name"."ID", "Name"."LAST_NAME", "Name"."FIRST_NAME", "Name"."EMAIL", "Activity"."ACTIVITY_TYPE", "Activity"."PRODUCT_CODE", "Activity"."TRANSACTION_DATE", "Name"."BIRTH_DATE", DATEDIFF(YEAR, "Name"."BIRTH_DATE", GETDATE()) - CASE WHEN
CONVERT(char(5), GETDATE(), 101) < CONVERT(char(5), "Name"."BIRTH_DATE", 101) THEN 1 ELSE 0 END AS "AGE"
FROM "IMIS"."dbo"."Activity"...
December 22, 2015 at 1:07 pm
Eirikur Eiriksson (12/22/2015)
ScottPletcher (12/22/2015)
Edit: Not at all "moving the goalposts". The only reason for the rule is the issue it causes if you get the type wrong, as I...
December 22, 2015 at 12:28 pm
The really tricky part of this is deciding how you want to handle Feb 29 birthdays: in non-leap years, is that birthday Feb 28 or Mar 1? In certain...
December 22, 2015 at 12:15 pm
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 11:18 am
Eirikur Eiriksson (12/22/2015)
ScottPletcher (12/22/2015)
Eirikur Eiriksson (12/22/2015)
😎
My point is that incorrect typing and implicit conversions do cause problems, I've lost...
December 22, 2015 at 11:14 am
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 11:10 am
Lynn Pettis (12/22/2015)
ScottPletcher (12/22/2015)
December 22, 2015 at 10:52 am
Eirikur Eiriksson (12/22/2015)
😎
My point is that incorrect typing and implicit conversions do cause problems, I've lost count of how...
December 22, 2015 at 10:49 am
To insure consistency in how the DELETE is done, you should always use an alias for the affected table when using DELETE [table_name] ... FROM ....
For example:
DELETE a
FROM tbl_a a
<join_type>...
December 22, 2015 at 10:19 am
Viewing 15 posts - 4,531 through 4,545 (of 7,614 total)