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

How do I sum the number of infinite text answers?

Hello,

I am stuck on this one. To illustrate my point, I will use cars as my
example.

I have a text field for which users can enter in anything they want. This
particular field holds the reply to the question "What model car do you own?"
Since there are nearly infinite number of vehicle models out there, I have no
intention of creating a restricted drop down or list box.

Therefore, users can input anything from "Mustang" to "RX 330" to "Countach."
This information pulls into a report that is sorted by location. This
results in a list of drivers located in a particular area of the country
showing each model they drive.

What I need to do is count how many replies equal "Mustang", "RX 330" and
"Countach" understanding that there can be an infinite number of replies.

Any help?

Regards,

BH

(Remember, I am using cars as an example which theorotically can be limited
to a list. In my database, there truly is an unlimited number of answers.)

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200807/1

Jul 21 '08 #1
10 2326
Try

SELECT CarModels.CarModel, Count(CarModels.CarModel,) AS CountOfCarModel
FROM CarModels
GROUP BY CarModels.CarModel;

It should give yo what you want, but meaningless. Even using your example a
Countach will be a totally different car to Lamborghini Countach and
different again from lamborgini Countach. 1 Car - 3 answers. So you could
edit the results manually, or limit the choice with 2 or 3 combo boxes in
the first place.

Phil

"bhipwell via AccessMonster.com" <u30281@uwewrote in message
news:877ee5a6ccedb@uwe...
Hello,

I am stuck on this one. To illustrate my point, I will use cars as my
example.

I have a text field for which users can enter in anything they want. This
particular field holds the reply to the question "What model car do you
own?"
Since there are nearly infinite number of vehicle models out there, I have
no
intention of creating a restricted drop down or list box.

Therefore, users can input anything from "Mustang" to "RX 330" to
"Countach."
This information pulls into a report that is sorted by location. This
results in a list of drivers located in a particular area of the country
showing each model they drive.

What I need to do is count how many replies equal "Mustang", "RX 330" and
"Countach" understanding that there can be an infinite number of replies.

Any help?

Regards,

BH

(Remember, I am using cars as an example which theorotically can be
limited
to a list. In my database, there truly is an unlimited number of
answers.)

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200807/1

Jul 21 '08 #2
Hi Phil,

Thanks for your reply. In regards to having 3 answers for one car, this
actually won't be an issue within the database since the administrator will
be defining the variables per client.

Basically, the database tracks employee benefit programs. One client may
offer three health plans. The health plans can be named an infinite number
of ways. However, one three pre-determined names would be available for the
particular client.

My report now shows a list of all employees and the health plan they are on.
What I am looking for is a way to tell me that X number of employees are on
plan A, X on plan B and X on plan C.

I put your formula in a text box on the report with no success as it is
asking for a parameter value.

Thoughts? Help?

B

--
Message posted via http://www.accessmonster.com

Jul 31 '08 #3
My fault,

I added the code to the end of my SQL:

TBLEmployeeInfo.EeHEALPlan, Count(TBLEmployeeInfo.EeHEALPlan,)AS
CountofEeHEALPlan FROM TBLEmployeeInfo GROUP BY TBLEmployeeInfo.EeHEALPlan;

I get the error: Syntax error in query expression

B

--
Message posted via http://www.accessmonster.com

Jul 31 '08 #4
"bhipwell via AccessMonster.com" <u30281@uwewrote in
news:87fadf83f02ab@uwe:

Basically, the database tracks employee benefit programs. One client
may offer three health plans. The health plans can be named an
infinite number of ways.
Maybe not!
Jul 31 '08 #5
Where is the "SELECT"

Phil

"bhipwell via AccessMonster.com" <u30281@uwewrote in message
news:87faf6a0851a7@uwe...
My fault,

I added the code to the end of my SQL:

TBLEmployeeInfo.EeHEALPlan, Count(TBLEmployeeInfo.EeHEALPlan,)AS
CountofEeHEALPlan FROM TBLEmployeeInfo GROUP BY
TBLEmployeeInfo.EeHEALPlan;

I get the error: Syntax error in query expression

B

--
Message posted via http://www.accessmonster.com

Jul 31 '08 #6
"bhipwell via AccessMonster.com" <u30281@uwewrote in
news:87faf6a0851a7@uwe:
My fault,

I added the code to the end of my SQL:

TBLEmployeeInfo.EeHEALPlan, Count(TBLEmployeeInfo.EeHEALPlan,)AS
CountofEeHEALPlan FROM TBLEmployeeInfo GROUP BY
TBLEmployeeInfo.EeHEALPlan;

I get the error: Syntax error in query expression

B
There is a comma that should not be in the snippet below, and you
need a space between the ) and AS
Count(TBLEmployeeInfo.EeHEALPlan,)AS
--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Jul 31 '08 #7
The SELECT is at the beginning of my SQL statement for my query that has many
other statements. The spacing and comma issues have been fixed. Now getting
a syntax error. Thoughts?

B

--
Message posted via http://www.accessmonster.com

Aug 1 '08 #8
"bhipwell via AccessMonster.com" <u30281@uwewrote in
news:8804385478038@uwe:
The SELECT is at the beginning of my SQL statement for my query
that has many other statements. The spacing and comma issues have
been fixed. Now getting a syntax error. Thoughts?

B
I think, therefore, that unless you copy and paste the SQL that gives
you the syntax error, to the newsgroup, you are wasting bandwidth.

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 1 '08 #9
On Thu, 31 Jul 2008 20:44:28 GMT, lyle fairfield <ly******@yah00.cawrote:
>"bhipwell via AccessMonster.com" <u30281@uwewrote in
news:87fadf83f02ab@uwe:

>Basically, the database tracks employee benefit programs. One client
may offer three health plans. The health plans can be named an
infinite number of ways.

Maybe not!
Hopefully not!

Infinite is an undefinable value. If any one of the health plans has a truly
infinite number of ways it can be named, then the sun of that plan is simply
infinite. No calculations required. And therefore the sum of the three plans
together is also infinite. Infinity + 3 + 13 = infinity.

See number of possible permutations in a good math book. The equations are
simple algebra with the possible exception of a term "x!".
If x = 4 then x! = 1 * 2 * 3 * 4 = 24. On a good scientific calculator
there will be a key: x!.

Chuck
--
Aug 1 '08 #10
On Thu, 31 Jul 2008 20:44:28 GMT, lyle fairfield <ly******@yah00.cawrote:
>"bhipwell via AccessMonster.com" <u30281@uwewrote in
news:87fadf83f02ab@uwe:

>Basically, the database tracks employee benefit programs. One client
may offer three health plans. The health plans can be named an
infinite number of ways.

Maybe not!
My apologies Lyle. My last post under your name should have gone to bhipwell.

Chuck
--
Aug 1 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: netclectic | last post by:
Hi folks, i've searched and searched and can't find any example of what i'm trying to do. Essentially (i think) i need to add a new operator to Number. I'm using eval to evaluate expressions...
37
by: Protoman | last post by:
Hi!!! Protoman here, I need to write an infinite precision number class b/c I want to compute pi. Give me some sample code. Also, when I run my program and it computes pi, will my computer freeze...
3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
2
by: John S | last post by:
I have created an event handler that is trying to format each number as it is typed. Example If the first char is 1 = output is $1.00 second char is 3 = output is $13.00 next is 5 = $135.00...
0
by: R.A.M. | last post by:
Hi, Could you help me please with a problem of infinite page load? I have an ASP.NET page (texts in Polish; meaning not important): <%@ Page Language="C#" AutoEventWireup="true"...
58
by: mailursubbu | last post by:
Hi How to write a program to get the factorial of 4096. I am working on a Linux m/c. Best Regards, Subra
52
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
4
by: mohammadthalif | last post by:
Hello guys, i want to pass infinite number of arguments to a function and print all of them how can i do it in c. example: main(void) { foo(1,2,3,"welcome","hi","how are you"); ...
11
by: kalar | last post by:
Hello, i have a problem with an infinite loop. I have got 4 arrays , each of them, have 5 integers the elements are from random funtcion, I don't want to have same elements in the arrays so i make...
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: 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
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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.