Friday, December 5, 2008

Triggers

Triggers:

============== SQL Server 2005=====================

 

IF OBJECT_ID ('dbo.trEmployee', 'TR') IS NOT NULL

   DROP TRIGGER dbo.trEmployee

GO

CREATE TRIGGER trEmployee

ON Practice.dbo.Employee

AFTER INSERT, UPDATE

AS

update employee set triggerdate=getdate()

GO

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

 

============== SQL Server 2000=====================

 

IF OBJECT_ID ('Sales.reminder1', 'TR') IS NOT NULL

   DROP TRIGGER Sales.reminder1

GO

CREATE TRIGGER reminder1

ON Sales.Customer

AFTER INSERT, UPDATE

AS RAISERROR ('Notify Customer Relations', 16, 10)

GO

 

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

 

In the above Two examples 'Sales.reminder1' where as ‘Sales’ is the Database and ‘reminder1’ is the table name and 'TR' is the Trigger.The object_ID will return the integer.If any trigger is there You are telling to drop the trigger and then Create trigger triggername on (databaseobject(dbo).table) this is in sql server 2005 and (database.table) this is in sql server 2000.After the which event u want to fire the trigger like insert,update(dml) as where u want to save the trigger in the table.

 

Here the result after the update or insert the trigger event will fire and save in to system triggers in the same table.

Languages with object-oriented features


§                     ABAP

§                     Ada 95

§                     BETA

§                     Blue

§                     Boo

§                     C++

§                     C#

§                     COBOL

§                     ColdFusion

§                     Common Lisp

§                     COOL (Object Oriented COBOL)

§                     CorbaScript

§                     Clarion

§                     CLU

§                     Curl

§                     D

§                     Object Pascal (Borland Delphi)

§                     Dylan

§                     E

§                     Eiffel

§                                 Sather

§                     F-Script

§                     F#

§                     Fortran 2003

§                     Gambas

§                     Graphtalk

§                     IDLscript

§                     incr Tcl

§                     J

§                     JADE

§                     Java

§                                 Groovy

§                                 Join Java

§                                 X10

§                     Lasso

§                     Lava

§                     Lexico

§                     Lingo

§                     Modula-2

§                    Modula-3

§                     Moto

§                     Nemerle

§                     NetRexx

§                     Oberon (Oberon-1)

§               Oberon-2

§                     Object REXX

§                     Objective-C

§                     Objective Cam

§                     Oz

§                     Mozart Programming System

§                     Perl 5

                 PHP

§                     Pliant

§                     PRM

§                     Prototype-based languages

§                                 Actor-Based Concurrent Language, ABCL: ABCL/1, ABCL/R,ABCL/R2, ABCL/c+

§                                 Agora

§                                 Cecil

§                                 Cel

§                                 ECMAScript

§                                             ActionScript

§                                             JavaScript

§                                             JScript

§                                 Etoys in Squeak

§                                 Io

§                                 Lua

§                                 Lisaac

§                                 MOO

§                                 NewtonScript

§                                 Obliq

§                                 REBOL

§                                 Self

§                     Python

§                     REALbasic

§                     Revolution

§                     Ruby

§                     Scala

§                     Simula

§                     Smalltalk

§                                 Self

§                                 Bistro

§                                 Squeak

§                     S (programming language)

§                                 R (programming language)

§                     Squirrel

§                     Superx++

§                     TADS

§                     Ubercode

§                     Visual Basic

§                                 VB.NET

§                                 VBScript

§                                 VBA

§                     Visual FoxPro

§                     Visual Prolog

§                     Tcl

§                                 Xotcl similar to CLOS

§                                 Snit uses delegation

§                                 itcl similar to C++

§                     XBase_plus_plus Extends xBase Standard Language

§                     ZZT-oop

 

Tuesday, September 30, 2008

Put The Glass Down..Must Read

Study this small story, Hope that makes a BIG change in YOU
 
Professor began his class by holding up a glass with some water in it.  He held it up for all to see & asked the students
“How much do you think this glass weighs?”
 
'50gms!' .... '100gms!' .....'125gms'  ...the students answered.                      
                   
 
 
“I really don't know unless I weigh it,” said the professor, “but, my question is:
 
What would happen if I held it up like this for a few minutes?”
 
'Nothing' …..the students said.
 
'Ok what would happen if I held it up like this for an hour?' the professor asked.
 
'Your arm would begin to ache' said one of the student
 
“You're right, now what would happen if I held it for a day?”
 
“Your arm could go numb, you might have severe muscle stress & paralysis & have to go to hospital for sure!”
….. ventured another student & all the students laughed
 
“Very good.
 
But during all this, did the weight of the glass change?”
asked the professor.
 
'No‘…. Was the answer.
 
“Then what caused the arm ache & the muscle stress?”
 
The students were puzzled.
 
“What should I do now to come out of pain?” asked professor again.
 
“Put the glass down!” said one of the students
 
“Exactly!” said the professor.
 
 Life's problems are something like this.
Hold it for a few minutes in your head & they seem OK.
 
Think of them for a long time & they begin to ache.
Hold it even longer & they begin to paralyze you. You will not be able to do anything.
 
It's important to think of the challenges or problems in your life,
But EVEN MORE IMPORTANT is to ‘PUT THEM DOWN' at the end of every day before You go to sleep.
 
That way, you are not stressed, you wake up every day fresh &strong & can handle any issue, any challenge that comes your way!
 
 
So, when you leave office today,
Remember friend to
'PUT THE GLASS DOWN TODAY! '