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 |
|
sneethling
Starting Member
22 Posts |
Posted - 2001-03-07 : 06:48:19
|
| I need an "If exists" Test which will indicate whether a singel Inserted record's date range is overlapping with other records in the same table. There is two types of tests.1. Date_From is part of the Primary Key2. Date_From is NOT part of the Primary Key.Use the following table deffinition to show me a trigger (Insert or Update).SAMPLE_TABLE1ID_NR1 int Primary Key,ID_NR2 char(5) Primary Key,DATE_FROM smalldatetime,DATE_TO smalldatetimeSAMPLE_TABLE2ID_NR1 int Primary Key,ID_NR2 char(5) Primary Key,DATE_FROM smalldatetime Priamry Key,DATE_TO smalldatetimeRemember that DATE_TO can have a null value.The Error message must be : "Date period overlaps with one or more period(s)"Can some one HELP please.... !!! |
|
|
|
|
|