Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    7

    Unanswered: SQL Query question

    Hi,
    I have this situation:
    In my DB there is a lot production start and a lot production end.
    I want to be able to check if the interval the user entered is already in the DB.
    For example, in the DB I have LotStart=1 and LotEnd=10
    The user want to enter LotStart=6 and LotEnd=20.

    I can also have In the same time in the DB these:
    LotStart = 17 LotEnd = 18

    How can I check if an interval is already there?

    Thanks

    Frank

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Wink

    Try this:

    Select 'Interval Is Used'
    From Interval_Table
    Where User_Lotstart Between Lotstart And Lotend
    Or User_Lotend Between Lotstart And Lotend;

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2003
    Posts
    7
    thanks works perfectly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •