Click here to Skip to main content
15,904,655 members
Home / Discussions / Database
   

Database

 
GeneralRe: Sql Query Required! Pin
Colin Angus Mackay15-Jun-05 3:01
Colin Angus Mackay15-Jun-05 3:01 
GeneralRe: Sql Query Required! Pin
Zishan Haider15-Jun-05 21:36
Zishan Haider15-Jun-05 21:36 
GeneralQuestions OleDB JET4 Pin
Saksida Bojan14-Jun-05 23:07
Saksida Bojan14-Jun-05 23:07 
QuestionIs MSDE overkill for single computer? Pin
Nathan Holt at EMOM14-Jun-05 12:11
Nathan Holt at EMOM14-Jun-05 12:11 
AnswerRe: Is MSDE overkill for single computer? Pin
Christian Graus14-Jun-05 14:00
protectorChristian Graus14-Jun-05 14:00 
GeneralRe: Is MSDE overkill for single computer? Pin
Nathan Holt at EMOM15-Jun-05 6:15
Nathan Holt at EMOM15-Jun-05 6:15 
GeneralDatabase Event Log Pin
irwtla14-Jun-05 6:22
irwtla14-Jun-05 6:22 
GeneralMake COUNT(*) return 0 Pin
Luis Alonso Ramos14-Jun-05 5:48
Luis Alonso Ramos14-Jun-05 5:48 
Hello,

I'm having a little problem with the COUNT function. I have a table with payments for customers (say 42 or 54 each), and each payment is marked as paid whenever the customer comes and pays it.

I want to make a query that gives me all the customers with the number of paid payments (including those customers new for this week). The total number of customers is 328, but if I add the COUNT(*) the resulting table only contains 291, all with 1 or more payments (meaning 37 customers have 0 payments.)

Looking in the web I found that COUNT(column) returns the number of rows in which that column is not NULL. In this case, I'm using COUNT(*) which should return the count of all rows. I'm also using a WHERE clause to limit the counted payments to only those that have been paid. I tried a LEFT JOIN, so that at least the resultset would include the rows, even if the count column is NULL, but it didn't work.

Any ideas?

-- LuisR





Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralRe: Make COUNT(*) return 0 Pin
Daniel Turini14-Jun-05 6:43
Daniel Turini14-Jun-05 6:43 
GeneralRe: Make COUNT(*) return 0 Pin
Luis Alonso Ramos14-Jun-05 3:55
Luis Alonso Ramos14-Jun-05 3:55 
GeneralRe: Make COUNT(*) return 0 Pin
toxcct14-Jun-05 20:52
toxcct14-Jun-05 20:52 
GeneralRe: Make COUNT(*) return 0 Pin
Luis Alonso Ramos15-Jun-05 6:53
Luis Alonso Ramos15-Jun-05 6:53 
GeneralOUTER JOIN, Crystal Reports Pin
V.13-Jun-05 23:40
professionalV.13-Jun-05 23:40 
GeneralSQL queries with adapter Pin
scchan198413-Jun-05 18:02
scchan198413-Jun-05 18:02 
GeneralRe: SQL queries with adapter Pin
Colin Angus Mackay13-Jun-05 22:34
Colin Angus Mackay13-Jun-05 22:34 
GeneralSQL Server distribution Pin
Tom Archer13-Jun-05 14:08
Tom Archer13-Jun-05 14:08 
GeneralRe: SQL Server distribution Pin
oykica13-Jun-05 19:48
oykica13-Jun-05 19:48 
GeneralStored procedure table parameter Pin
adilson05uk12-Jun-05 23:25
adilson05uk12-Jun-05 23:25 
GeneralRe: Stored procedure table parameter Pin
Christian Graus13-Jun-05 14:07
protectorChristian Graus13-Jun-05 14:07 
GeneralRe: Stored procedure table parameter Pin
adilson05uk13-Jun-05 22:47
adilson05uk13-Jun-05 22:47 
GeneralRe: Stored procedure table parameter Pin
Christian Graus14-Jun-05 13:46
protectorChristian Graus14-Jun-05 13:46 
GeneralFind TABLE NAME PARAMETER PARAMETR VALUE WHEN STORED PROCEDURE CALL WITHIN APPLICATION Pin
leopawan12-Jun-05 19:27
leopawan12-Jun-05 19:27 
GeneralRe: Find TABLE NAME PARAMETER PARAMETR VALUE WHEN STORED PROCEDURE CALL WITHIN APPLICATION Pin
Colin Angus Mackay12-Jun-05 23:02
Colin Angus Mackay12-Jun-05 23:02 
GeneralRelationship in Database Diagram Pin
summer100612-Jun-05 19:04
summer100612-Jun-05 19:04 
GeneralTranspose 1 row into multiple rows in an MS SQL database table Pin
phokojoe12-Jun-05 3:42
phokojoe12-Jun-05 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.