Ah,
That explains it. I just solved it using an ugly workaround.
SELECT count(*) FROM table1
WHERE ObjectID IN(
SELECT ObjectID
FROM table1 t1 INNER JOIN table2 t2 ON t1.thisID = t2.thisID
UNION
SELECT ObjectID
FROM table1 t1 INNER JOIN table3 t3 ON t1.thisID = t3.thisID
)
Thanks all,
George
On 7/7/05, Claude Schneegans <[EMAIL PROTECTED]> wrote:
> >>
>
> SELECT count(*)
> FROM (
> SELECT ObjectID
> FROM table1 t1 INNER JOIN table2 t2 ON t1.thisID = t2.thisID
> UNION
> SELECT ObjectID
> FROM table1 t1 INNER JOIN table3 t3 ON t1.thisID = t3.thisID
> )
>
> AFAIK, one can have a subquery in a WHERE or HAVING clause, but not inside a
> FROM.
> How about making two separate queries and add their record count in CF?
>
>
>
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211387
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54