RowId in Subquery

Hi,
I have the following definition for an object :

Select : SUM ( T1.NO_COPIES)
Where : T1.rowid in ( select max ( T1_Alias.rowid ) from T1_Alias
where T1_alias.Id = T1.Id )

T1 has five rows and they are 10 , 2 : 10, 2: 10,2: 11,3: 12,1.
The objective of the above select is to show 2 for Id 10, 3 for Id 11 and 1 for Id 12.
When I parse the above object definition, I get ORA-00942 : Table or View does not exist message.
Any help would be really appreciated.

Ramesh


Listserv Archives (BOB member since 2002-06-25)

I think all you have to do is add T1_ALIAS to your Table list in the Object Definition.

You also could have defined this object as:

Select : SUM( T1.NO_COPIES ) / COUNT( T1.ROWID ) Where :

Then you’d avoid the cost of doing a subquery.


Erich Hurst
Compaq Computer Corporation
(281) 514-9445
Erich.Hurst@Compaq.com

I have the following definition for an object :

Select : SUM ( T1.NO_COPIES)
Where : T1.rowid in ( select max ( T1_Alias.rowid ) from T1_Alias
where T1_alias.Id = T1.Id )

When I parse the above object definition, I get ORA-00942 : Table or View does not exist message.


Listserv Archives (BOB member since 2002-06-25)

a guess,

Select : SUM ( T1.NO_COPIES)
Where : T1.rowid in ( select max ( T1_Alias.rowid ) from T1 T1_Alias
where T1_alias.Id = T1.Id )

Peter

Ramesh Narayanan ranaraya@IEEE.ORG 30/07/98 20:48:04 >>>
Hi,
I have the following definition for an object :

Select : SUM ( T1.NO_COPIES)
Where : T1.rowid in ( select max ( T1_Alias.rowid ) from T1_Alias
where T1_alias.Id = T1.Id )

T1 has five rows and they are 10 , 2 : 10, 2: 10,2: 11,3: 12,1.
The objective of the above select is to show 2 for Id 10, 3 for Id 11 and 1 for Id 12.
When I parse the above object definition, I get ORA-00942 : Table or View does not exist message.
Any help would be really appreciated.

Ramesh


Listserv Archives (BOB member since 2002-06-25)