Cash Payments By Denomination

  • Comments posted to this topic are about the item Cash Payments By Denomination

  • I'd prefer a single UPDATE statement:

    UPDATE raa

    SET tt_TotalPay = aan.TotalPay,

    tt_CountOf100s = aan.TotalPay / 100,

    tt_CountOf50s = aan.TotalPay % 100 / 50,

    tt_CountOf20s = aan.TotalPay % 100 % 50 / 20,

    tt_CountOf10s = aan.TotalPay % 100 % 50 % 20 / 10

    FROM #RefsAndAmounts raa

    CROSS APPLY (

    SELECT tt_GameCount * 20 AS TotalPay

    ) AS aan --assign_alias_names

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Thanks for the nice script.

  • Thanks to everyone for the positive and helpful feedback. This was my first submission ... it was fun!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply