i do enjoy a good merge

another reason for the list of reasons why sql server (2005 onwards) is
better than ASE.

Wrap the merge in a function call maybe?  Or work something better with
the different sim calcs calls.