IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Have two table with same name but created by different user


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 139
Location: South Africa

PostPosted: Thu Jun 02, 2005 2:27 pm
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
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: 139
Location: South Africa

PostPosted: Thu Jun 02, 2005 5:18 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top