I-Lin, thank you for your observation. I tried to join the two, but i get a
SQL error. i used:
dn.user_id *= u.user_id
(get all data for a user's id only if it exists in the dn table - is that
right?)
and i get the error:
Query contains an outer-join request that is not permitted.
I'm not sure what this error means. Can you tell me? Thank you.
john
>From: cf refactoring <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Re: SQL Question - SUM weirdness
>Date: Sun, 16 Sep 2001 16:27:19 -0700 (PDT)
>
>OT observation: this doesn't directly relate to your
>problem, but you have no table join condition on
>tblUsers in your query.
> >
> > Query:
> > SELECT
> > u.first_nm
> > , u.last_nm
> > , c.category_nm
> > , c.category_id
> > , c.dataType
> > , c.department_id
> > , SUM(dn.quantity_nb)AS totalForMonth
> > , g.goal_nb
> > FROM
> > tblcategories c
> > , tblDailyNumbers dn
> > , tblUsers u
> > , tblGoals g
> > WHERE
> > c.department_id = 1
> > AND
> > DatePart("mm", dn.date_dt) = 9
> > AND
> > DatePart("yy", dn.date_dt) = 2001
> > AND
> > c.Category_id *= g.Category_id
> > AND
> > c.category_id *= dn.category_id
> > GROUP BY
> > u.last_nm
> > , c.category_nm
> > , c.category_id
> > , c.department_id
> > , g.goal_nb
> > , c.dataType
> > , u.first_nm
>
>
>=====
>I-Lin Kuo
>Macromedia CF5 Advanced Developer
>Sun Certified Java 2 Programmer
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists