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 |
jimmy2090
Starting Member
26 Posts |
Posted - 2013-06-28 : 08:10:21
|
i am facing problem to check the date duration in the same tableVisitor_Name Company Date_In Date_OutAlibaba ABC_Company 01-Jun-13 30-Jun-13Alibaba ABC_Company 02-Jun-13 28-Jun-13as data above, how to prevent the second record been insert into the same table as the same duration even different date. |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-06-28 : 09:00:40
|
By creating a unique constraint on Visitor_Name column, will make sure not to duplicate the vistor again in the tableCheersMIK |
|
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2013-06-28 : 09:30:32
|
What if the Date_Out of the second one is 03-Jul-13?djj |
|
|
|
|
|