• If you know the format is always going to be -, yes, you can do it in a set-based way. You could do something along the lines of:

    WHERE MyNumber = SUBSTRING(MyID, 1, CHARINDEX('-', MyID, 1) - 1)

    K. Brian Kelley
    @kbriankelley