473,395 Members | 1,763 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,395 software developers and data experts.

Returning more values than I want in MS Access 2003

12
I have a very simple query that I am trying to pull any data back between the number 1 and 3 in a field.

What is happening is I am also getting 12 and 11. I only want the number 1. How do I specify to return only the number 1 not the 11 or 12?

Here is my code:

SELECT entity.name, line.renewal
FROM entity INNER JOIN line ON entity.entityid = line.entity
WHERE (((line.renewal) Between [What month do you want to begin with?] And [What month do you want to end with?]));

Thanks in advance for any help.

Emmi
Jun 15 '07 #1
3 1166
FishVal
2,653 Expert 2GB
I have a very simple query that I am trying to pull any data back between the number 1 and 3 in a field.

What is happening is I am also getting 12 and 11. I only want the number 1. How do I specify to return only the number 1 not the 11 or 12?

Here is my code:

SELECT entity.name, line.renewal
FROM entity INNER JOIN line ON entity.entityid = line.entity
WHERE (((line.renewal) Between [What month do you want to begin with?] And [What month do you want to end with?]));

Thanks in advance for any help.

Emmi
Hi!

Its very likely that field line.renewal is Text type.
You should change it to Number type or use Val(line.renewal) in query.

Good luck.
Jun 15 '07 #2
Emmi
12
Thank you so much!!! That was exactly what the problem was. You are the best!
Jun 15 '07 #3
FishVal
2,653 Expert 2GB
Thank you so much!!! That was exactly what the problem was. You are the best!
Very glad that could help you. :)
Jun 15 '07 #4

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

Similar topics

6
by: Krackers | last post by:
How do you write a function which returns a reference to an array. I can only get a function to return a copy of the array itself. I've had a look at some other threads in this group an the return...
7
by: Dr John Stockton | last post by:
What are the best ways of returning multiple results from a subroutine ? I've been using ... return } which is inelegant. I'm used to Pascal's procedure X(const A, B : integer; var C, D :...
1
by: Julie May | last post by:
I have 90% of my function working and I know to get the next 10% it is justa matter of getting the quotations and the escaping quotations correct. Here is the portion that does work: <working...
25
by: Andreas Fromm | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Im building an user database with many tables keeping the data for the Address, Phone numbers, etc which are referenced by a table where I...
4
by: Joe User | last post by:
Hi all....I have a feeling this is going to be one of those twisted query questions, but here it goes anyways.... I want to generate a report that shows the chronology of events (represented by...
1
by: BT Openworld | last post by:
I've just had to upgrade to Access 2003. Our company's main sales database started in Access V1.0 and has progressed through V2.0 and 97 without problems. I've converted it to 2003 format and have...
3
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and...
41
by: Materialised | last post by:
I am writing a simple function to initialise 3 variables to pesudo random numbers. I have a function which is as follows int randomise( int x, int y, intz) { srand((unsigned)time(NULL)); x...
4
by: Earl T | last post by:
When I try to get the netscape version for version 7, I get the HttpBrowserCapabilities class returning the version as 5 and not 7. (see code and output below) CODE HttpBrowserCapabilities...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.