Home Forums SQL Server 7,2000 T-SQL Stored procedure Script to display and add two different currency columns using case for conversions RE: Stored procedure Script to display and add two different currency columns using case for conversions

  • issa269 (4/30/2013)


    Thanks ChrisM@Work for the help, it removed the duplicates as i had asked but the total cost for the added column displayed value for only dollars(id for dollar is 3 and the default one is 1) but for the currencies with id not 1 or 3, their total cost became zero, any idea why they showed zero?

    Add c.Rate to the SELECT list.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden