Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    85

    Question Unanswered: Remove duplicate values

    Hello everyone..

    I have a problem with a query

    What i need is, when i am displaying this result in jsp page, i want to show only one orders_id with other details, as follows,


    Refer Result attachment

    But this can't be taken with distinct,,

    Plz help me out..

    Im attaching what i have tried so far..

    But no good with them..
    Attached Thumbnails Attached Thumbnails shot.JPG   Result.JPG  

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you have indicated in your attachment that you want this --
    Code:
    order_id  products_id  products_model  products_name
      376        3006         GD0123       Gudrun: milk chocolates
      376        3020         4F0007       ODEL treats: Sri Lankan Delights - Jam
      376        3021         GD0123       ODEL treats: Sri Lankan Delights - Jam
    to be shown like this --
    Code:
    order_id  products_id  products_model  products_name
      376        3006         GD0123       Gudrun: milk chocolates
                 3020         4F0007       ODEL treats: Sri Lankan Delights - Jam
                 3021         GD0123       ODEL treats: Sri Lankan Delights - Jam
    this is something you should do with application logic, not with sql
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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