| Suppose you have a rankF20=1 UDM, and from there you want to, as you put it: "eliminate the 2 outside rail positions in SQL regardless of field size." 
 Easy to do if you use RailPosition with FieldSize and a little math.
 
 Something like the following should work:
 
 SELECT * FROM STARTERHISTORY
 WHERE RANKF20 = 1
 AND RAILPOSITION < (FIELDSIZE - 1)
 
 
 Or, alternately:
 
 SELECT * FROM STARTERHISTORY
 WHERE RANKF20 = 1
 AND NOT RAILPOSITION >= (FIELDSIZE - 1)
 
 
 
 -jp
 
 .
 
 
 |