Results 1 to 2 of 2

Thread: query urgent

  1. #1
    Join Date
    May 2003
    Posts
    8

    Unanswered: query urgent

    my table is:

    col1 col2 col3 col4 col5 col6
    IT3 njfghj 0 0 0 Blue
    IT3 njfghj 0 0 Simple 0
    IT3 njfghj 0 35 0 0
    IT3 njfghj Lee 0 0 0


    i want the result as

    col1 col2 col3 col4 col5 col6
    IT3 njfghj Lee 35 Simple Blue

    how is this posible??

  2. #2
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    1

    Re: query urgent

    Try something like this:

    SELECT Col1, Col2, MAX(Col3) AS Col3, MAX(Col4) AS Col4, MAX(Col5) AS Col5, MAX(Col6) AS Col6
    FROM TableName
    GROUP BY Col1, Col2

    Regards,
    Thomas

Posting Permissions

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