Click here to Skip to main content
15,916,452 members
Home / Discussions / Database
   

Database

 
GeneralRe: SELECT 1 Query Question Pin
Blue_Boy23-Aug-07 2:59
Blue_Boy23-Aug-07 2:59 
AnswerRe: SELECT 1 Query Question Pin
Colin Angus Mackay23-Aug-07 2:30
Colin Angus Mackay23-Aug-07 2:30 
QuestionCheck valid Date Pin
EvanSaunders22-Aug-07 23:58
EvanSaunders22-Aug-07 23:58 
AnswerRe: Check valid Date Pin
Krish - KP23-Aug-07 0:32
Krish - KP23-Aug-07 0:32 
GeneralRe: Check valid Date Pin
EvanSaunders23-Aug-07 0:38
EvanSaunders23-Aug-07 0:38 
AnswerRe: Check valid Date Pin
Joe23-Aug-07 1:08
Joe23-Aug-07 1:08 
GeneralRe: Check valid Date Pin
EvanSaunders23-Aug-07 1:14
EvanSaunders23-Aug-07 1:14 
AnswerRe: Check valid Date Pin
Michael Potter23-Aug-07 4:16
Michael Potter23-Aug-07 4:16 
Range comparisons are not that horrible if you break them down. In order for a range to overlap, the first requirement would be that the New.StartDate is less than (or equal too) the Stored.EndDate. If not, then they don't clash. If it is true, then see if the New.EndDate is greater than (or equal too) the Stored.StartDate. If this is also true, then you have an overlapping range.

In a stored proceedure it would look something like this:
IF EXISTS(SELECT *
          FROM [MyTable]
          WHERE 
               @StartDate <= [EndDate] AND
               @EndDate >= [StartDate])
BEGIN
   /* Throw error on overlapp */
END
ELSE
BEGIN
  /* Append new row */
END

Questionfetching field names from a table in MS Access Pin
Karismatic22-Aug-07 23:26
Karismatic22-Aug-07 23:26 
AnswerRe: fetching field names from a table in MS Access Pin
PIEBALDconsult23-Aug-07 5:47
mvePIEBALDconsult23-Aug-07 5:47 
Questionhow to deploy report in re from another machine Pin
salmonraju22-Aug-07 23:24
salmonraju22-Aug-07 23:24 
Questionfetch listbox with values vb .net Pin
RaveRare22-Aug-07 22:06
RaveRare22-Aug-07 22:06 
AnswerRe: fetch listbox with values vb .net Pin
Panchal Hardik23-Aug-07 1:12
Panchal Hardik23-Aug-07 1:12 
QuestionFectch listbox with student name vb. net Pin
RaveRare22-Aug-07 21:58
RaveRare22-Aug-07 21:58 
Questionsql server 2000 Pin
Sonia Gupta22-Aug-07 20:50
Sonia Gupta22-Aug-07 20:50 
AnswerRe: sql server 2000 Pin
John-ph22-Aug-07 21:01
John-ph22-Aug-07 21:01 
GeneralRe: sql server 2000 Pin
Sonia Gupta23-Aug-07 0:31
Sonia Gupta23-Aug-07 0:31 
AnswerRe: sql server 2000 Pin
Krish - KP22-Aug-07 21:16
Krish - KP22-Aug-07 21:16 
GeneralRe: sql server 2000 Pin
Sonia Gupta23-Aug-07 0:29
Sonia Gupta23-Aug-07 0:29 
QuestionHow do I remove the restrictions on the password? Pin
Big Ralph22-Aug-07 20:15
Big Ralph22-Aug-07 20:15 
Questionsp_change_users_login 'problems' Pin
AlterD22-Aug-07 19:21
AlterD22-Aug-07 19:21 
AnswerRe: sp_change_users_login 'problems' Pin
AlterD22-Aug-07 20:40
AlterD22-Aug-07 20:40 
Questionusing replace function, Please help Pin
SharonRao22-Aug-07 18:14
SharonRao22-Aug-07 18:14 
AnswerRe: using replace function, Please help Pin
John-ph22-Aug-07 22:31
John-ph22-Aug-07 22:31 
AnswerRe: using replace function, Please help Pin
edukulla22-Aug-07 23:27
edukulla22-Aug-07 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.