View previous topic :: View next topic |
Author |
Message |
ranga_subham Intermediate

Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Fri May 30, 2008 5:29 am Post subject: Is my purpose surved with this query? |
|
|
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 |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Fri May 30, 2008 6:21 am Post subject: |
|
|
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 |
|
 |
ranga_subham Intermediate

Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Fri Jun 20, 2008 5:27 am Post subject: |
|
|
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 |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Fri Jun 20, 2008 6:42 am Post subject: |
|
|
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 |
|
 |
|
|