473,385 Members | 1,693 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,385 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 12594
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.