> >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 prefere
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.
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.*
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 P
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 Pr
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 ID>2 and you want tasks for all of
Hi,
I have the following two tables in my database:
mysql> DESCRIBE Projects;
+--+--+--+-+-++
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-++
| Pro
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 fast
: 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 w
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 PowerBui
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 S
I have 2 tables:
1) t1
mysql> describe t1;
++-+--+-+-++
| Field | Type| Null | Key | Default | Extra |
++-+--+-+-++
| id | int(3) | | PRI | NULL| auto_increme
>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 | - st
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
- siz
14 matches
Mail list logo