Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Query required

Query required

Scheduled Pinned Locked Moved ASP.NET
databasehelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siddisagar
    wrote on last edited by
    #1

    S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 Srikakulum 30 4 warangal 20 5 others 250 ----- Total 470 I am getting above output. But I have to show warangal and Srikakulum also in others category My Result shoul be looks like below Pls help me in the Query S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 others 300 ----- Total 470

    A S 2 Replies Last reply
    0
    • S siddisagar

      S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 Srikakulum 30 4 warangal 20 5 others 250 ----- Total 470 I am getting above output. But I have to show warangal and Srikakulum also in others category My Result shoul be looks like below Pls help me in the Query S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 others 300 ----- Total 470

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      This has nothing to Do with ASP.Net. Post it on General Database Forum :-D

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

      1 Reply Last reply
      0
      • S siddisagar

        S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 Srikakulum 30 4 warangal 20 5 others 250 ----- Total 470 I am getting above output. But I have to show warangal and Srikakulum also in others category My Result shoul be looks like below Pls help me in the Query S.No Districtnames count ---- ------------- ------ 1 Visakhapatnam 90 2 RangaReddy 80 3 others 300 ----- Total 470

        S Offline
        S Offline
        Sundeep Ganiga
        wrote on last edited by
        #3

        As abhijit Said,Don't Try to Post Such Questions here. Let me try,Only this time for You here.

        siddisagar wrote:

        show warangal and Srikakulum also in others category

        if your requirement is to Show A(Visakhapatnam) and B (RangaReddy) and remaining as C (others),then here is the query. select DN,sum(DC) CNT from ( select case Districtnames when 'Visakhapatnam' then Districtnames when 'RangaReddy' then Districtnames else 'Others' end 'DN', count 'DC' from Districts) as t group by DN

        Sundeep Ganiga When the only tool you have is a hammer, everything looks like a nail. Come Forth Yourself to Click "Good Answer" for any expected solution. Let us Support our C Project Programmers who provide solutions here.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups