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

Text to Number, then sum in a query

30
I have a table with a combo box,[Origines] two choices

'Prospect'
'Marketing'

I have created a query

Expand|Select|Wrap|Line Numbers
  1. Points Origines: IIf([Origines]='Prospect',1,0)
However when I try to SUM how many 'Prospect' i have per ID it is adding in the 'Marketing' and Null's too
Sep 24 '11 #1
2 1644
Narender Sagar
189 100+
Hi Lisa,
If you just want to analyse "how many 'Prospect' per ID" then you can do it simply by making a SELECT Query. Your SQL query should look something like this :
Expand|Select|Wrap|Line Numbers
  1. SELECT [yourtablename].[Origines], Count([yourtablename].[Origines]) AS [CountOfOrigines]
  2. FROM [yourtablename]
  3. GROUP BY [yourtablename].[Origines];
Pl. check and maintain it with your table name, and revert.
Sep 24 '11 #2
NeoPa
32,556 Expert Mod 16PB
Lisa B:
However when I try to SUM how many 'Prospect' i have per ID it is adding in the 'Marketing' and Null's too
It seems clear then that your SUMming code is wrong. Unfortunately, you don't include that in the question so we're not in much of a position to help you.
Sep 26 '11 #3

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

Similar topics

19
by: xixi | last post by:
i want to use sql query to open a resultset, say i want the cursor point to whatever position i start with by giving a row number , so is there anyway i can use the sql function to do that, so...
2
by: Tom | last post by:
Hi all: I've run into a problem that is confounding me. Hope you can help. I have the following query (having removed alot of stuff for clarity: SELECT tblComponent.TagNumber,...
2
by: sara | last post by:
I have a mess on my hands. I have a whole set of queries and reports (almost a whole app, really) that has "location" as a text field. Sometimes it's a number and a few times it's text (001, 002,...
0
by: jpauthement | last post by:
I have an application which searches through a comma-delimited text file which looks similar to this: "012233010","PAMIC 6X8","FA","0.000","0.000" "012233011","PAMIC 8X8","FA","1.000","0.000" ...
10
by: BillCo | last post by:
I've been fishing in the collective knowledge pool of cdma posts gone by for a solution to this for a while - but no joy. Needless to say, I've also done my own head in trying to figure this out. ...
0
by: Casey | last post by:
I am really having trouble with a full-text search query. Here's what I've got: SELECT listing_id, RANK, name, address, city, zip, heading, phone FROM listings a, FREETEXTTABLE(listings, *,...
2
by: Milkstr | last post by:
is it possible to pass dynamic text through the query string command?? I know you can just pass a variale through a link eg. www.text1.com/text1.asp?username="Mike" but i want to use the...
3
by: clickingwires | last post by:
Is there anyway to number a query's rows? Like there are 5 records and you add a field to the query that counts them, 1, 2, 3, ...
11
by: browndudley | last post by:
I searched the forum and found something very close to helping me with what I'm trying to do but not exactly. I need to sequentially group number the results in an access query as if by grouping...
1
by: postman | last post by:
Is there a way to only return the text from a field that matches the criteria? For example, if the criteria for the query is "Like *########*" (any 8-digit numbers at any position in the field),...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.