Update system [message #372591] |
Mon, 26 February 2001 13:12 |
Michael Bailey
Messages: 8 Registered: February 2001
|
Junior Member |
|
|
Hi,
I have a temp table in a tablespace called system and a table that I need to update in a tablespace called combined. I need to take one field from the table in sytem and update the one in combined but when I do it can't see the data items.
How can I specify say a tablespace then the table followed by the data item, i've tried COMBINED.MEMBERSHIPS.MEMBERSHIP_NO and also with the second full stop but that don't work. I've just been given the job of a dba without any documentation or help/experience so any help would help a great deal.
Thanks, Michael.
|
|
|
Re: Update system [message #372592 is a reply to message #372591] |
Mon, 26 February 2001 14:13 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
When you say TABLESPACE, that is not the User account. Tablespace relates to where the table is stored. Tablespaces comprise data files, the data files reside on disk.
To be able to access one user's table from another user, you need to either grant select, insert, delete and/or update privs from the table owner to the other user. e.g. grant select on XYZ to Scott; Now from scott, you can access the table.
e.g.
update temp_table a
set a.col1 = (select b.col1
from system.temp_table b
where a.my_key = b.my_key)
where a.my_key in (select select b.col1
from system.temp_table);
|
|
|