Re: Returning All Rows That Repeat

2007-08-01 Thread Brent Baisley
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 HAV

Re: Returning All Rows That Repeat

2007-07-29 Thread Gary Josack
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:

Re: Returning All Rows That Repeat

2007-07-29 Thread John Kopanas
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 P

RE: Returning All Rows That Repeat

2007-07-29 Thread John Trammell
>> 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 =

Re: Returning All Rows That Repeat

2007-07-29 Thread Gary Josack
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 right