HighDots Forums  

MSSQL Count

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss MSSQL Count in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MikeL7
 
Posts: n/a

Default MSSQL Count - 06-10-2008 , 04:51 PM






I am trying to write a query that counts records from two tables, but am
getting wrong counts. Basically what i want is this:
SELECT Count(callSched.callID) as callCount, Count(visitSched.visitID) as
visCount, employees.workerNumber, employees.workerName
From employees LEFT OUTER JOIN
callSched on employees.workerNumber = callSched.empID LEFT OUTER JOIN
visitSched on employees.workerNumber = visitSched.wrkID
GROUP BY workerNumber, workerName

I get the proper columns grouped, but am getting 400,000 as the count when it
should be 1500-2000.
Any ideas how to make this return the results?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.