• that C_recId is probably a varchar?

    adding a format to the order by might help instead:

    select *

    from customer

    where C_recid in (50200,50194,50430,50191,1)

    order by RIGHT('00000' + C_recid ,5) DESC

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!