Hi,

I have a resultset which looks like below.

A
B
C
D
E
F
G
H


I would like to order this result set with reference to another string by the dictinary distance. So taking D as reference, I would like to see the following output

D
C
E
A
F
G
H

This is a simple example. Actually the resultset I am retreiving can have variable length string. So the solution should be scalable to

Thanks in advance.