473,411 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Between And Operator

lotus18
866 512MB
Hello World!

I know that The BETWEEN ... AND operator selects a range of data between two values and I found article about this operator that it is treated differently in different databases. Some scenarios

  1. With some databases a person with the LastName of "Hansen" or "Pettersen" will not be listed (BETWEEN..AND only selects fields that are between and excluding the test values).
  2. With some databases a person with the last name of "Hansen" or "Pettersen" will be listed (BETWEEN..AND selects fields that are between and including the test values).
  3. With other databases a person with the last name of "Hansen" will be listed, but "Pettersen" will not be listed (BETWEEN..AND selects fields between the test values, including the first test value and excluding the last test value).
From http://www.w3schools.com/sql/sql_between.asp

At the above scenarios, what scenario that access 2003 belongs? I need an urgent reply. Thanks
Mar 4 '08 #1
8 12598
Stewart Ross
2,545 Expert Mod 2GB
Hello World!

I know that The BETWEEN ... AND operator selects a range of data between two values and I found article about this operator that it is treated differently in different databases. Some scenarios
  1. With some databases a person with the LastName of "Hansen" or "Pettersen" will not be listed (BETWEEN..AND only selects fields that are between and excluding the test values).
  2. With some databases a person with the last name of "Hansen" or "Pettersen" will be listed (BETWEEN..AND selects fields that are between and including the test values).
  3. With other databases a person with the last name of "Hansen" will be listed, but "Pettersen" will not be listed (BETWEEN..AND selects fields between the test values, including the first test value and excluding the last test value).
From http://www.w3schools.com/sql/sql_between.asp

At the above scenarios, what scenario that access 2003 belongs? I need an urgent reply. Thanks
Hi. In Access 2003 the Between operator behaves as in scenario 2. It is equivalent to
Expand|Select|Wrap|Line Numbers
  1. ([fieldname] >= [firstvalue]) AND ([fieldname] <= [lastvalue])
-Stewart
Mar 4 '08 #2
lotus18
866 512MB
Hi. In Access 2003 the Between operator behaves as in scenario 2. It is equivalent to
Expand|Select|Wrap|Line Numbers
  1. ([fieldname] >= [firstvalue]) AND ([fieldname] <= [lastvalue])
-Stewart
Thaks for your reply. Actually I'm plannung to create a scheduler for other classes. And I want to apply this. Can you help me an algorithm to detect conflicts?

Rey Sean
Mar 4 '08 #3
NeoPa
32,556 Expert Mod 16PB
Rey Sean,

We can help with specific questions. It is your job to produce your project. If you need help during that process, then please post your specific questions.
Mar 6 '08 #4
lotus18
866 512MB
Sorry for that admin,

I came up with this algo to detect conflict schedules
  • If Existing Time Started >= New Time Started AND Existing Time Started < New Time Finished
  • Existing Time Finished > New Time Started AND Existing Time Finished < = New Time Finished
  • Existing Time Started = New Time Started
  • New Time Started > = Existing Time Started AND New Time Started < Existing Time Finished
Did I miss anything? But anyway thanks for the concern.
Mar 7 '08 #5
NeoPa
32,556 Expert Mod 16PB
Schedule conflict can be broken down more simply than that (See related thread How to prevent overlapping schedules?).
The logic for checking schedule A does not overlap schedule B is :
A is completed before B starts
OR
A starts after B completes

Breaking this down we have :
End(A) < Start(B)
OR
Start(A) > End(B)

An overlap is the reverse so :
End(A) >= Start(B)
AND
Start(A) <= End(B)
Mar 7 '08 #6
lotus18
866 512MB
You have a simple algo than me ^ _ ^
Thanks again! NeoPa
Mar 8 '08 #7
NeoPa
32,556 Expert Mod 16PB
I've had to deal with it a few times before ;)

(oh, and I'm clever too :-> - lol)
Mar 8 '08 #8
lotus18
866 512MB
I've had to deal with it a few times before ;)

(oh, and I'm clever too :-> - lol)
Oh, I see. : )
Mar 9 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

22
by: BekTek | last post by:
Hi.. I'm so sorry about that I've postes so many questions recently.. :) I'm still confused about the differences between malloc and operator new.. I know that when we work with class object and...
6
by: Arne Schmitz | last post by:
I guess this has been asked before, but I cannot find any answer to this problem. I have program like this: ---SNIP--- #include <cassert> #include <cstdlib> class C { public:
4
by: Mark Reed | last post by:
Hi all, I have a query (query1) which shows scan date, scan time & operator. One scan = 1 record. What I want to do is create a report based on query 2 from query1 which shows all the scans AND...
26
by: Gary Wessle | last post by:
Hi I need help to generate some random numbers between 2 and 8. #include <cstdlib> using std::rand; the following was out of my range, int main() {
2
by: Eric Lilja | last post by:
I'm looking at an assignment where the students are expected to write a class with a given purpose. According to the assignment, you should be able to do this with instances of the class:...
7
by: Alex Vinokur | last post by:
What is the difference between an operator and a function in C++? Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html...
11
by: blangela | last post by:
I am teaching a C programming course to C++ programmers and want to come up with list of _KEY_ differences between the two languages. Below is a list I have come up with so far. Have I missed any?...
3
by: Aarti | last post by:
Hi, Why does void* p = new (1024); gives me a compilation error while void* p = operator new (1024); works. What is the difference between new and "operator new"? Please help. Regards,
4
by: DBC User | last post by:
This is a very simple question, I have a number and I want to check if the number is between 2 integers. I can use 'if' to resolve this situation. But I am curious, if there is any other verbs that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.