Wednesday, May 22, 2013

Photo: Mapleton Farm

Photo take in Mapleton Ontario during the long weekend.

WebApp: ClippingMagic - Online Mask creation - made real easy !

Interesting application for removing/masking out part of an image: www.clippingmagic.com

Tuesday, May 21, 2013

Microsoft: XBox ONE - The next generation XBox

Microsoft has revealed the next XBox. Officially called the, "XBox ONE". The specs as follows:

8 Core CPU
8GB Memory
500GB HDD
Blu-Ray
802.11n
HDMI I/O
USB 3.0

... more details to come ...


Wednesday, May 15, 2013

SQL Trigger: Updating a, "Modification_Date" with a Trigger

Never found a clear example online of simply updating a database's modification date with when a row is changed so I thought I would post one:

 =======================

 CREATE TRIGGER [dbo].[TRG_{TABLE-NAME}_Update_ModificationDate] ON [dbo].[{TABLE-NAME}]

AFTER UPDATE AS

 DECLARE @{UNIQUE-COLUMNNAME} [uniqueidentifier]

 SELECT @{UNIQUE-COLUMNNAME} = i.{UNIQUE-COLUMNNAME} FROM inserted i

UPDATE {TABLE-NAME} SET Modification_Date = GETDATE()
   WHERE {UNIQUE-COLUMNNAME} = @{UNIQUE-COLUMNNAME};

========================

Legend:
 {TABLE-NAME} = Name of Table to create the SQL Server Trigger on.
 {UNIQUE-COLUMNNAME} = Name of Column in table above that uniquely identifies a row.