Link to home
Start Free TrialLog in
Avatar of joaotelles
joaotellesFlag for United States of America

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_DESTINATIONADDRESS 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_TERMINALMODELMASTERID = 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
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joaotelles

ASKER

Tks for the articles!