|
Posted by signon77 on 10/30/07 16:44
Hi Roy,
Thanks for your help with this. My code now works looking like this:
SELECT
rr.BookName,
rr.ExternalId, -- Deal
rr.D1MTM, -- MTM on d-1
rr.PoolMTM, -- Pool MTM
abs(rr.[Difference]), -- Difference
rr.Comments -- Comments
FROM
#RevReps rr
UNION SELECT
d.BookName,
d.ExternalId, -- Deal
d.D1MTM, -- MTM on d-1
d.PoolMTM, -- Pool MTM
abs(d.[Difference]), -- Difference
d.Comments -- Comments
FROM
#RevRepDeals d
ORDER BY ExternalId desc, BookName asc, abs([Difference]) desc
Thanks again!!
Robert Ilechuku
[Back to original message]
|