Click to See Complete Forum and Search --> : Query - Joining Tablespaces??


transio
05-02-2003, 07:22 PM
Hi again, everyone.

I'm trying to select from two tablespaces like this:

SELECT
st1.tag_name tag1,
st2.tag_name tag2
FROM
schema1.table_name st1,
schema2.table_name st2
WHERE st1.id = st2.id

It's working fine when I'm logged in as SYSTEM, but when I'm logged in as schema1, I get the following error:

ORA-00942: table or view does not exist

I realize this is because schema1 can't see the tables in schema2, but I don't know how to resolve it. Anyone have any input?

Thanks !!!

stecal
05-02-2003, 07:57 PM
Couple of ways -

grant select on schema_name.table_name to public;
grant select on schema_name.table_name to username;

pando
05-02-2003, 09:12 PM
joining tablespaces?!?!?!

stecal
05-02-2003, 09:21 PM
He's from SQL Server, forgive him his trespasses.

transio
05-02-2003, 10:43 PM
Stecal,

Thanks for the code. Is there any way to grant priveleges to the entire tablespace?

Also, believe me, I know it's a sin. It's just as bad in MSSQL. Nevertheless, I have two disparate systems that I have to select from in combination with eachother for reporting purposes.

Thanks for your patience :)