• not quite.

    what the above code does is links the point ON the id in alphabet table.

    Point can be any number ie see below.

    OrderID Point
    Order1 4
    Order2 12 
    Order3 12
    Order4 12 
    Order5 29 
    Order6 31 
    Order7 49

    I have ordered the list by Point.  therefore it starts with A and checks if there is another equal Point, if so then assign A, else B, checks if theres another Point equal to B, and so on, like below:

    OrderID Point LetterCode
    Order1 4 A
    Order2 12 B
    Order3 12 B
    Order4 12 B
    Order5 29 C
    Order6 31 D
    Order7 49 E