User Profile

Collapse

Profile Sidebar

Collapse
archy22
archy22
Last Activity: Jul 10 '15, 07:38 PM
Joined: Jul 1 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I want just distinct names, but need to display list of id,names in the results.
    How do I do that?

    Running this query will not fetch me distinct names as the id, name combination is taken together to check distinct probably.
    See more | Go to post

    Leave a comment:


  • distinct with order by usage is not bringing unique values

    I have written this query:

    select distinct company_id,comp any_name from (select company_id, company_name from companies order by UPPER(company_n ame) asc);


    It brings out an ordered company name list. But the values aren't unique.
    Can you please help me understand what is wrong with the query?

    I am using db2 V10.1 (LUW).
    See more | Go to post
No activity results to display
Show More
Working...