Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
venkata manohar
Starting Member
4 Posts |
Posted - 2012-01-10 : 02:22:02
|
Hi Friends !!I'm Venkat. I've got a question.I've a table with EmpID,EmpName,DOB columns.What i need is to know the message ..if there is any insert/update in the table with DOB<1981...Note: DOB column has got many years starting from 1970-2000Here we use triggers as well. But unable to find the perfect logic.Kindly help me with this guys...!!Thanks in AdvanceVenkat |
|
Sachin.Nand
2937 Posts |
Posted - 2012-01-10 : 03:40:07
|
Whats the problem with triggers ?After Monday and Tuesday even the calendar says W T F .... |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-10 : 04:06:33
|
why do you need to do check after a report? isnt it just a matter of restricting the insert by means of a check constraint?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-10 : 04:08:11
|
if you want to do it current way. you need a check likeIF EXISTS(SELECT 1 FROM Table WHERE DOB<1981)PRINT 'your message'------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|