What is the query that you are trying to execute?

Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com
 

-----Original Message-----
From: Sam Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 9:55 AM
To: ActiveServerPages
Subject: Re: GROUP BY question

Excellent reply, thanks Tore.

I think I have got a Cartesian product, but I dont know what to do about
it!

Also, I get this error when trying to use GROUP BY without using an
aggregate function:

Column 'tblJob.JobRef' is invalid in the select list because it is not
contained in either an aggregate function or the GROUP BY clause

...so I went and included every single column from all the tables which
I
have inner joinned, but I exceeded the maximum allowed in the GROUP BY
clause.

What I am doing wrong here?

Thanks, Sam


----- Original Message -----
From: "Bostrup, Tore" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 2:29 PM
Subject: RE: GROUP BY question


> Beware your question...
>
> GROUP BY without any aggregate functions works like a DISTINCT.  If
you
get
> multiple copies of the same data, make sure that is not a result of a
> Cartesian product in the underlying query.  In this case, although you
will
> get fewer rows back (it eliminates the duplicate rows), your query is
just
> as inefficient - except for the network traffic generated by your
returned
> data.
>
> HTH,
> Tore.
>
> -----Original Message-----
> From: Sam Thompson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 4:12 AM
> To: ActiveServerPages
> Subject: GROUP BY question
>
>
> Will using GROUP BY help me cut down the amount of records that are
> returned? Or does it just organise them?
>
> Can I use it without using an aggregate function?
>
> Thanks, Sam
>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
> %%email.unsub%%
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>


---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%




---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to