Results 1 to 4 of 4

Thread: Grouping prblm

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Unanswered: Grouping prblm

    Hi

    This is my first post here so please be gentle.

    I have a group sp which gets my data like below

    spTest Surname DateSold PlotPrice Comp date SalesPerson Percentage RefundedAmount Site SaleID
    Smith 06/04/2006 3,600.00 04/04/2006 Cooper 5 500.00 Site1 945
    Smith 06/04/2006 11,600.00 06/04/2006 Cooper 5 500.00 Site2 945


    The problem is i only want the RefundedAmount to be 500.00 once the rest to be 0 if the SaleID is the same

    How can I get around this?

    Any help would be great

    Cheers

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by shiggyshag
    spTest Surname DateSold PlotPrice Comp date SalesPerson Percentage RefundedAmount Site SaleID
    Smith 06/04/2006 3,600.00 04/04/2006 Cooper 5 500.00 Site1 945
    Smith 06/04/2006 11,600.00 06/04/2006 Cooper 5 500.00 Site2 945

    The problem is i only want the RefundedAmount to be 500.00 once the rest to be 0 if the SaleID is the same
    Plz explain a bit more....whats that "once the rest to be 0" ?
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  3. #3
    Join Date
    Apr 2006
    Posts
    2
    Hi sorry bad english.

    The problem is i only want the RefundedAmount to be 500.00 once. The rest to be 0 if the SaleID is the same.

    Hope that helps

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    47
    What you posted is the existing result set from your stored procedure ?

    Can you post your table structure, sample data from the table and the expected result.
    -----------------
    KH


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •