?
Solved

recotd count is 0

Posted on 2004-04-27
6
Medium Priority
?
227 Views
Last Modified: 2012-05-04
How can i show  0 count
if EmpCount = 0

My query skips if count is 0

sql = "SELECT count([Devlopment].empid) As EmpCount,[Course Titles].Title,[Course Titles].Title FROM [Course Titles] INNER JOIN Devlopment ON [Course Titles].ID = Devlopment.TitleID WHERE Devlopment.plan=True group by [Course Titles].Title"

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3
   do while not re.eof

example

Titles   EmpCount
  35      3
  10      0
  17      1

0
Comment
Question by:alberte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 12

Expert Comment

by:ill
ID: 10929063
sql = "SELECT count([Devlopment].empid) As EmpCount,[Course Titles].Title,[Course Titles].Title FROM [Course Titles] LEFT JOIN Devlopment ON [Course Titles].ID = Devlopment.TitleID WHERE Devlopment.plan=True group by [Course Titles].Title"
0
 

Author Comment

by:alberte
ID: 10929172
I got
Syntax error in JOIN operation.

/school/media/admin/planned/planned.asp, line 36
0
 
LVL 6

Accepted Solution

by:
Lord_McFly earned 200 total points
ID: 10929490
SELECT COUNT([Development].empid) AS EmpCount, [Course Titles].Title
FROM [Course Titles] LEFT OUTER JOIN Development ON Development.TitleID = [Course Titles].ID
WHERE Development.plan = True
GROUP BY [Course Titles].Title
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question