AGSTAFF-13 Using proper query techniques and fixed query parameter for order