Re: COUNT Problem

2004-10-18 Thread Frederic Wenzel
A subselect may help: [...] Don't know ATM if it can be done more easily, but a query like this should probably work. It can be done without a sub-query: [...] That *should* work, barring any typos or ommisions I may have made. I used LEFT JOIN because of personal preference, it can be

COUNT Problem

2004-10-17 Thread shaun thornburgh
Hi, I have the following two tables in my database: mysql DESCRIBE Projects; +--+--+--+-+-++ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-++ |

Re: COUNT Problem

2004-10-17 Thread Merlin, the Mage
Hi, Tihs looks to me as too few information. What is in your tables (the information)? What does the query return (a empty set)? Maybe 'cause in your where clause where you have Project_ID 2 you should have Project_ID=2? Or you have several projects with ID2 and you want tasks for all of

Re: COUNT Problem

2004-10-17 Thread Frederic Wenzel
On Sun, 17 Oct 2004 19:36:34 +, shaun thornburgh [EMAIL PROTECTED] wrote: A Project will have 1 or more tasks assigned to it. Using the following query, how can I modify it so that I can find out the largest number of tasks assigned to a group of projects. SELECT P.*, T.* FROM Projects

RE: COUNT Problem

2004-10-17 Thread Jose Miguel Pérez
Hi Shaun! A Project will have 1 or more tasks assigned to it. Using the following query, how can I modify it so that I can find out the largest number of tasks assigned to a group of projects. SELECT P.*, T.* FROM Projects P, Tasks T WHERE P.Project_ID = T.Project_ID AND Project_ID

Re: COUNT Problem

2004-10-17 Thread Chris
Frederic Wenzel wrote: On Sun, 17 Oct 2004 19:36:34 +, shaun thornburgh [EMAIL PROTECTED] wrote: A Project will have 1 or more tasks assigned to it. Using the following query, how can I modify it so that I can find out the largest number of tasks assigned to a group of projects. SELECT P.*,

RE: COUNT Problem

2004-10-17 Thread Jose Miguel Pérez
Hi Shaun! I beg you pardon, my last message was incomplete! I will quote the last lines from my previous post: ---8- Cut here ---8--- - Thanks to the LIMIT clause, we get only the first result, which by the way is one of the projects with the most assigned tasks. If

Re: select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

2003-08-14 Thread Hans van Harten
Fatt Shin wrote: Yes, found the problem, you are right. Thanks. But this is something caused by powerbuilder, in my code I never put any space between count(*), but when it goes to odbc, an space is added. Any idea how to solve this? Wouldn't sum(1) return the same count -theoratically

RE: select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

2003-08-09 Thread Fatt Shin
: Friday, August 08, 2003 12:17 AM To: Fatt Shin Cc: [EMAIL PROTECTED] Subject: Re: select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51 You are not doing select count(*) You are doing select count ( *) Get rid of the spaces before the ( Fatt Shin wrote: Hi, I'm running MySQL 4.0.13

select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

2003-08-07 Thread Fatt Shin
Hi, I'm running MySQL 4.0.13, connecting from PowerBuilder 9 using ODCB Connector 3.51. I'm facing a problem where whenever I issue a SELECT COUNT(*) statement from PowerBuilder, I always get SQL syntax error back from MySQL. (Refer to ODBC Trace I captured below). metrohouse af8-b94 ENTER

Re: select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

2003-08-07 Thread gerald_clark
You are not doing select count(*) You are doing select count ( *) Get rid of the spaces before the ( Fatt Shin wrote: Hi, I'm running MySQL 4.0.13, connecting from PowerBuilder 9 using ODCB Connector 3.51. I'm facing a problem where whenever I issue a SELECT COUNT(*) statement from PowerBuilder,

count() problem - URGENT !!

2001-07-03 Thread Ireneusz Piasecki
I have 2 tables: 1) t1 mysql describe t1; ++-+--+-+-++ | Field | Type| Null | Key | Default | Extra | ++-+--+-+-++ | id | int(3) | | PRI | NULL|

sum/count problem

2001-01-23 Thread Wouter Siteur
Hi, I try to use 2 COUNT's and a SUM in query from 2 tables, but am not able to get the results I want. The 2 tables are batches and testresults, and have the following fields and relation: batches: testresults: - batch_nr ---+ - id - date | - status -

Re: sum/count problem

2001-01-23 Thread Bob Hall
Hi, I try to use 2 COUNT's and a SUM in query from 2 tables, but am not able to get the results I want. The 2 tables are batches and testresults, and have the following fields and relation: batches: testresults: - batch_nr ---+ - id - date | - status -