|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: |
-- TRIGGER ONE WORKING ------------------------
USE [MyDB]
GO
/****** Object: Trigger [dbo].[create_scan_history_record_on_update] Script Date: 01/14/2009 16:33:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ============================================================
-- Author: xxxxxxxxxxxxxxxxxxxxx
-- Create date: 14.01.09
-- Description: Create scan history record.
-- ============================================================
ALTER TRIGGER [dbo].[create_scan_history_record_on_update] ON [dbo].[project]
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO [dbo].[scan_history]
([Project_ID],
[Scan_Filepath],
[Scan_Start],
[Scan_End],
[Number_Terms_Scanned],
[Number_Results_Returned],
[Status_ID])
SELECT
i.Project_ID,
'Undefined',
GetDate(),
GetDate(),
0,
0,
1
FROM inserted i
join deleted d on i.Project_ID = d.Project_ID
WHERE i.Is_Submitted = 1 and d.Is_Submitted = 0
END
-- TRIGGER TWO NOT WORKING ------------------------
USE [MyDB]
GO
/****** Object: Trigger [dbo].[update_project_record] Script Date: 01/15/2009 14:17:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ============================================================
-- Author: Brendan Sullivan
-- Create date: 05.01.09
-- Description: Update project record with scan history id.
-- ============================================================
ALTER TRIGGER [dbo].[update_project_record] ON [dbo].[scan_history]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @scan_history_id int =
(
SELECT [Scan_History_ID]
FROM inserted
);
DECLARE @project_id int =
(
SELECT [Project_ID]
FROM inserted
);
UPDATE [dbo].[project]
SET Current_Item = @scan_history_id
WHERE Project_ID = @project_id
END
|
Advertisement
| Hall of Fame |