You have your count in the wrong spot. I'm not even sure how that
query would work. The count(*) should be part of a select field. By
putting it in the HAVING clause it's calculating it after the query
runs.
SELECT jobs.*, count(*) AS Cnt FROM jobs GROUP BY customer_number,
job_number
John Kopanas wrote:
I want to be able to return all rows that have one or more other rows
with the same customer_number and job_number.
So for instance. If their are two jobs in my jobs table with a
customer_number = '0123' and job_number ='12' then I want both of
those jobs to return one
From: John Kopanas [EMAIL PROTECTED]
Subject: Returning All Rows That Repeat
I want to be able to return all rows that have one or more other rows
with the same customer_number and job_number.
So for instance. If their are two jobs in my jobs table with a
customer_number = '0123' and
Does it makes sense that on a table of 100,000 rows that my DB is
crapping out with the following query?
SELECT * FROM jobs GROUP BY customer_number, job_number HAVING
count(*) 1 ORDER BY customer_number;
:-)
On 7/29/07, John Trammell [EMAIL PROTECTED] wrote:
From: John Kopanas [EMAIL
John Kopanas wrote:
Does it makes sense that on a table of 100,000 rows that my DB is
crapping out with the following query?
SELECT * FROM jobs GROUP BY customer_number, job_number HAVING
count(*) 1 ORDER BY customer_number;
:-)
On 7/29/07, John Trammell [EMAIL PROTECTED] wrote:
From: