Problem with null

  • Hello!!!

    It might be easy (for u) but i'm stuck on this, i have an sproc where i calculate totals, my problem is that when i have a null column i need to assign 1 to that column to keep running the operations. (eg. )

    I need to calculate a simple total

    Price * Qty

    but if qty is null it must perform the multiplication like this:

    price * 1

    How can i do that ????? i'd try CASE, WHILE and IF and i can not get the result i need.

    I really can't find a way to do it. Please if some one can enlight me to solve this i'll really appreciate.

    Thanks in advance

    Estuardo

     

    Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
    Lao-t'ze.

  • Please do not cross post and be carefull of duplicating posts in general. See/leave resposnes in http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=108587

  • Antares:

    I apoligize for posting duplicates, it was a mistake, i didn't on purpose. Next time i'll be more carefull to avoid this happen again.

    Regards

    Estuardo

    Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
    Lao-t'ze.

  • ANd don't let me catch it again.

     

    Dude, lighten up.

     

    Enjoy the site and remember to tip your waiters.

  • Thank you!!! i'm already enjoying

    and i would love to tip my waiters but i couldn't find any one here. Where ever i go i just find teachers like you

    Best regards

    Estuardo

    Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
    Lao-t'ze.

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

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