Creating view of a table from another user

Hi

i had  a user "sim" representing the main office having following tables
acc_glday,cashes,day_one,day_two andday_sub . for obtaining some consolidated
reports from all branches i had created another user "conso " and created all
the above tables on that user area also.
i am importing data from all branches including the main office  into tables in
user conso.

 i would like to  create a view by the union of tables of user sims and tables
of user conso on the user conso. if i can do taht   it is possible to avoid
importing  data from user sim to user conso and data redundancy can be
eliminated.

please help me for creating such a view of any of above mentioned tables on the
user area conso.


sincerely

rajesh
 
rajeshnalankalAsked:
Who is Participating?
 
kelfinkConnect With a Mentor Commented:
Oracle can define both VIEWs and SYNONYMs.

The VIEW you ask about is possible.  Sounds like you want to join tables between the two users.

For example:

CREATE VIEW V_SOME_TABLE_JOINED
SELECT * FROM  SIM.SOMETABLE a, CONSO.MYTABLE b
WHERE a.id = b.some_id ;

Remember that SIM must grant permission to CONSO to read his tables...

SIM>  GRANT SELECT ON SOMETABLE TO CONSO;



0
 
pellepCommented:
what database?
0
 
pellepCommented:
that is, what type of database system are you using?
0
 
rajeshnalankalAuthor Commented:
Hi

sorry for not mentioning full details

i am using oracle database

rajesh
0
 
pellepCommented:
maybe you should ask this question in the oracle TA instead.
0
All Courses

From novice to tech pro — start learning today.