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. Database & SysAdmin
  3. Database
  4. how can display data same input order

how can display data same input order

Scheduled Pinned Locked Moved Database
csharp
6 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.
  • U Offline
    U Offline
    Unknown Ajanabi
    wrote on last edited by
    #1

    i enter data in table at this order kamal 78 kamal 78 kamal 78 kamal 45 kamal 45 mohan 12 mohan 12 suresh 23 suresh 23 ram 78 ram 78 mahi 23 mahi 23 and i want to display data on this like [note display according entry] out put name amount timeofpaid kamal 78 3 kamal 45 2 mohan 12 2 suresh 23 2 ram 78 2 mahi 23 2

    no knowledge in .net

    P B 2 Replies Last reply
    0
    • U Unknown Ajanabi

      i enter data in table at this order kamal 78 kamal 78 kamal 78 kamal 45 kamal 45 mohan 12 mohan 12 suresh 23 suresh 23 ram 78 ram 78 mahi 23 mahi 23 and i want to display data on this like [note display according entry] out put name amount timeofpaid kamal 78 3 kamal 45 2 mohan 12 2 suresh 23 2 ram 78 2 mahi 23 2

      no knowledge in .net

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      You can do it with the help of Group By clause and count function.

      Parwej Ahamad g.parwez@gmail.com

      U 1 Reply Last reply
      0
      • U Unknown Ajanabi

        i enter data in table at this order kamal 78 kamal 78 kamal 78 kamal 45 kamal 45 mohan 12 mohan 12 suresh 23 suresh 23 ram 78 ram 78 mahi 23 mahi 23 and i want to display data on this like [note display according entry] out put name amount timeofpaid kamal 78 3 kamal 45 2 mohan 12 2 suresh 23 2 ram 78 2 mahi 23 2

        no knowledge in .net

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        select count(amount) as appeartimes,[name] from tablename group by amount,[name]


        I Love SQL

        U 1 Reply Last reply
        0
        • B Blue_Boy

          select count(amount) as appeartimes,[name] from tablename group by amount,[name]


          I Love SQL

          U Offline
          U Offline
          Unknown Ajanabi
          wrote on last edited by
          #4

          Mr blue boy i want to display record in order as entry in table like first time kamal pay 78 amount three time then pay 45 amount two time in table according entry order i want display record kamal 78 3 kamal 45 2 such like that ur quiry never give actual format like entry

          no knowledge in .net

          B 1 Reply Last reply
          0
          • P Parwej Ahamad

            You can do it with the help of Group By clause and count function.

            Parwej Ahamad g.parwez@gmail.com

            U Offline
            U Offline
            Unknown Ajanabi
            wrote on last edited by
            #5

            by using group by clause and count function never give correct format according the order of entry in table

            no knowledge in .net

            1 Reply Last reply
            0
            • U Unknown Ajanabi

              Mr blue boy i want to display record in order as entry in table like first time kamal pay 78 amount three time then pay 45 amount two time in table according entry order i want display record kamal 78 3 kamal 45 2 such like that ur quiry never give actual format like entry

              no knowledge in .net

              B Offline
              B Offline
              Blue_Boy
              wrote on last edited by
              #6

              hope this helps select name,count([amount]) as timeofpaid from tablename group by [name],amount order by name,timeofpaid


              I Love SQL

              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