joaotelles
asked on
Sqlplus - Query syntax question
Hi,
Im running Oracle 10g and Im having a problem with a query...
My query (not sure if this would be the best way to do it) but it goes through a bunch of table that are related to get a final result.. the problem is that Im getting several duplicated results...
I know ts hard to help like this but I cant give details of the tables..
where
subs.DPSN_DESTINATIONADDRE SS is not null
and subs.UEMTE_ID is not null
and subs.UEMTE_ID = terminal.UEMTE_ID
and terminal.UEMTT_ID is not null
and terminal.UEMTT_ID = ttype.UEMTT_ID
and ttype.UEMTT_TERMINALMODELM ASTERID = tm.TCRTM_MASTERID
As you can see Im going through the tables...
Fisrt I filter the subs table, then I pass to the ternminal table using the UEMTE_ID (common in both)... then I need the UEMTT_ID to go to the ttype tabel...
The problem is that the UEMTT_ID has a common number in several rows of the ttype table... so thats shy I think Im getting dulicated results...
ANy suggestion?
Tks,
Joao
Im running Oracle 10g and Im having a problem with a query...
My query (not sure if this would be the best way to do it) but it goes through a bunch of table that are related to get a final result.. the problem is that Im getting several duplicated results...
I know ts hard to help like this but I cant give details of the tables..
where
subs.DPSN_DESTINATIONADDRE
and subs.UEMTE_ID is not null
and subs.UEMTE_ID = terminal.UEMTE_ID
and terminal.UEMTT_ID is not null
and terminal.UEMTT_ID = ttype.UEMTT_ID
and ttype.UEMTT_TERMINALMODELM
As you can see Im going through the tables...
Fisrt I filter the subs table, then I pass to the ternminal table using the UEMTE_ID (common in both)... then I need the UEMTT_ID to go to the ttype tabel...
The problem is that the UEMTT_ID has a common number in several rows of the ttype table... so thats shy I think Im getting dulicated results...
ANy suggestion?
Tks,
Joao
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER