Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Have two table with same name but created by different user

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 11:20 am    Post subject: Have two table with same name but created by different user
Reply with quote

Hi all
I have a small doubt...
Suppose there are two users ..User1 and User2...
Now both the user create the same table Customer and made them public....
First doubt is that is it possible...
If yes then my second doubt is that i m the third user User3 and access Customer without giving any user name in prefix...which table i m going to view...

Thanks in advance
Saurabh
Back to top
View user's profile Send private message

jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Thu Jun 02, 2005 2:27 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Hi,

Its quite possible, and if in the case you have created a customer table from user3 it will retreive the data from that table.
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 4:19 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Hi Jkbytes
Thanks for the first response ...........But my question is if the third user has not created the table then which table he is going to view...The table created by the USER1 or the table created by the USER2
Back to top
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Thu Jun 02, 2005 5:18 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

hi saurabh,

if you are trying to access a table that is not created under your userid, then you may get the following error code when you are trying to retreive the records.

Code:
SQLCODE = -204; ERROR: USER03.CUSTOMER IS AN UNDEFINED NAME.
SQLSTATE  = 42704 SQLSTATE RETURN CODE.
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Fri Jun 03, 2005 9:57 am    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Thanks JK for the quick response ...
But still one doubt left and that is why he will not be able to access the table created by the user1 and user2.....They both have created the table and made it pubilc..
Thanks
SAurabh
Back to top
View user's profile Send private message
rajakishore

New User


Joined: 04 Apr 2005
Posts: 10
Location: Hyderabad

PostPosted: Fri Jun 03, 2005 10:08 am    Post subject:
Reply with quote

Hi Saurabh,

User3 has to give an unique identifier to recognize which table he has to access.

Here either he can give User1.Tablename or User2.Tablename

if u give just the Tablename without any qualifier then surely it will throw

error saying Tabelname not found.



Ragards,
Raj
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Fri Jun 03, 2005 10:52 am    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Thanks Raj for clearing the doubt
SAurabh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts User Cancels the job PANDU1 DB2 1 Sat Mar 04, 2017 8:21 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us