MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is my purpose surved with this query?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri May 30, 2008 5:29 am    Post subject: Is my purpose surved with this query? Reply with quote

Hi,

can somebody please explain what the below query would achieve?

Code:

SELECT B.VXX_OXXXX_NXX, B.VXX_EXXX_CX,         
       B.EXXX_OXXX_TXXXXX, B.EXXX_CXXXX_TXXXXX
FROM GXXXXX1.VXX_OXXXX A,                   
     GMOMM01.VX_EXXX_HXXX B                   
   WHERE A.VXX_IXXXX_NXX = '0ABCDEFGHIJKLMNO1'


My understanding on the above query is like this:

This query will fetch all the values from table B for the where condition A.VXX_IXXXX_NXX = '0ABCDEFGHIJKLMNO1'. I should get only few entries but getting space abend.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Fri May 30, 2008 6:21 am    Post subject: Reply with quote

Since you have no where conditions for table B you will get all entries from B for each row in A that matchs the where condition! You need a AND A.? = B.? or something similar to limit the output from table B.
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Jun 20, 2008 5:27 am    Post subject: Reply with quote

Hi,

I would like to limit the output from Table B.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Fri Jun 20, 2008 6:42 am    Post subject: Reply with quote

ranga_subham wrote:
Hi,

I would like to limit the output from Table B.

Thanks.


That would be a good idea but we have no idea of the relationships between the two tables.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group