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

sql count (should be simple)

Need help it's been a while since I have had to work in Accesss working off of 2000 on XP

I have 2 tables

tbl_Training
training_id
Recert_id
Empl_id

tbl_national_recert
Recert_id
Recert_desc


I am trying to select Recert_desc from tbl_national_recert
and a count of all times it appears in tbl training
(need all rows from tbl_national_recert and count from tbl_Training)

because there is a relationship on recert ID the query does not give me all rows in tbl_national_recert only the ones that appear in tbl_training)

Any help on this easy question would be appreciated.
Apr 18 '07 #1
2 1345
Rabbit
12,516 Expert Mod 8TB
Need help it's been a while since I have had to work in Accesss working off of 2000 on XP

I have 2 tables

tbl_Training
training_id
Recert_id
Empl_id

tbl_national_recert
Recert_id
Recert_desc


I am trying to select Recert_desc from tbl_national_recert
and a count of all times it appears in tbl training
(need all rows from tbl_national_recert and count from tbl_Training)

because there is a relationship on recert ID the query does not give me all rows in tbl_national_recert only the ones that appear in tbl_training)

Any help on this easy question would be appreciated.
You have to Right Join tbl_national_recert.
Apr 18 '07 #2
NeoPa
32,556 Expert Mod 16PB
Try :
Expand|Select|Wrap|Line Numbers
  1. SELECT TNR.Recert_id,
  2.        TNR.Recert_desc,
  3.        Count(TT.*) AS TrainingCount
  4. FROM tbl_national_recert AS TNR LEFT JOIN
  5.      tbl_Training AS TT
  6.   ON TNR.Recert_id=TT.recert_id
Apr 20 '07 #3

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

Similar topics

2
by: Gregory.Spencer | last post by:
Help, I have a query in MySQL which gets the details of members of a club. e.g. Select * from members. however, in the same query I want to return the amount of "functions" the member has...
3
by: rob.guitar.rob | last post by:
Hello, My last few posts have been revolving aroung the same problem, and I still cant solve it and I would be really appreciate if anyone could spot a problem. a section of my XML goes like...
7
by: Schraalhans Keukenmeester | last post by:
X-Followup: comp.lang.php I have a PHP script that adds messages to a simple MySQL Database. (PHP 5.0.3, MySQL 4.1.1) One of the fields it stores is msgid. The new msgid is a count of all...
22
by: Joseph Shraibman | last post by:
On a 7.3.4 database: explain analyse select count(*) from elog; Aggregate (cost=223764.05..223764.05 rows=1 width=0) (actual time=81372.11..81372.11 rows=1 loops=1) -> Seq Scan on elog ...
6
by: Nicolae Fieraru | last post by:
Hi All, I have a query, Select Count(BoolField) from tblMyTable, Where BoolField = true. If I run the query by itself, it returns the number of true records I want to use the result of that...
2
by: Alicia | last post by:
Hi, I have a simple question. I wanted to count a Column containing Dates and the word "Empty". This is what I am trying to do. Closed Dates ------------ 4/2/2004 4/7/2004 4/9/2004
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
4
by: lakshmananl | last post by:
hi, i am doing a report generation work in which i take the count of two columns. and i need to calculate the difference of the counted value as a new column. for example in SQL we use ...
68
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
4
by: andy.z | last post by:
I'm having trouble working this out ... Is there a simple way to count how many lines are returned in $_POST When I look at the $_POST all I see is one line yet there are three. I assume...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.