In that case, he may just need:

select count(*) from EVENT_TABLE, FRIENDS_EVENT where EVENT_TABLE. EVENT_ID = FRIENDS_EVENT. EVENT_ID

Just make sure that EVENT_TABLE is listed first in the from clause.

David

On 27-Sep-07, at 10:19 AM, John Huss wrote:

"SELECT (SELECT COUNT(*) FROM EVENT_TABLE WHERE EVENT_TABLE.EVENT_ID
= FRIENDS_EVENT.EVENT_ID)
FROM "EVENT_TABLE" t0">:

The FRIENDS_EVENT table is not brought into the query anywhere, so you can't reference columns from it. You need to get that table into the query.

John

On 9/26/07, Baiss Eric Magnusson <[EMAIL PROTECTED]> wrote:
I added a <Derived Column> to a table with the following <Read Format>

        (SELECT COUNT(*) FROM EVENT_TABLE WHERE EVENT_TABLE.EVENT_ID =
FRIENDS_EVENT.EVENT_ID)

It fails, and from <Data Browser> I see

JDBCAdaptorException: EvaluateExpression failed: <FrontbasePlugIn
$FrontbaseExpression:
"SELECT (SELECT COUNT(*) FROM EVENT_TABLE WHERE EVENT_TABLE.EVENT_ID
= FRIENDS_EVENT.EVENT_ID)
FROM "EVENT_TABLE" t0">:
Next exception:SQL State:00       subclass = " -- error code: 226 --
msg: Semantic error 226. Referenced column - EVENT_ID - not found.

Now both EVENT_TABLE and the many-to-many join table FRIENDS_EVENT
have an EVENT_ID field, so what is wrong?

BTW: this is taken from page 183 of Ravi Mendis' book and I believe
it is the correct solution to my previous question of how to create a
Fetch Specification where one of its conditions is
to check for an NSArray length of greater than zero.
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
< http://www.CascadeWebDesign.com>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ( [email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/johnthuss% 40gmail.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/programmingosx %40mac.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to