Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

How do you select distinct rows that are similar but not identical



have a resultset as follows (its result of of a connect by, prior tree query 
that shows me the hier. of substations) it is ordered by the Level desc.

LEVEL     TERMINAL_ID_SQ  SUBSTATION              TERMINAL_NAME
10              11664                   TAS50                           69KV1
8               11664                    TAS50                          69KV1
6               7782                      TSR41                         1
4               7782                      TSR41                         1
2               7500                      DC315                        4kV-1


I want the following result set 

SUBSTATION              TERMINAL_NAME
TAS50                         69KV1
TSR41                         1
DC315                        4kV-1

note that is has to be in the order of the level but i don't want to see same 
instance of substation eventhought it is at a different level (don't care it 
it uses level 10 or 8 they are identical in station and terminal names)



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.