Home Forums SQL Server 2008 T-SQL (SS2K8) Convert the stored procedure to "Standard SQL Select" RE: Convert the stored procedure to "Standard SQL Select"

  • Jeff Moden (4/11/2014)


    halifaxdal (4/11/2014)


    This is driving people crazy!

    There is another sp to be converted and this sp contains loop and lots of calculation. The original sp is working fine and logic is very simple, can I have advice from anyone?

    Yes... since the logic is "simple", I strongly recommend that you give it a shot on your own because you're likely the one that's going to have to support it. At least try. 😉 The best advice I can give to anyone trying to make such changes is in my signature line below about what to think about.

    Hi Jeff,

    Your reply is NOT an advice, it's an encouragement; I like to take your encouragement but I also post the question for advice.

    What I would like to know:

    1. How to loop the Division in a single Select

    2. How to do the calculation for @DRR which is @a /(@B + @C + @D)

    It would be appreciated if you or anyone can give me any clue, thank you in advance.