Experts Exchange connects you with the people and services you need so you can get back to work.
Select @ReturnCOID = max(COID) from Order
Open in new window
Select @ReturnCOID = top 1 COID from Order order by orderdate desc
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.