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. Display Data Month Wise

Display Data Month Wise

Scheduled Pinned Locked Moved Database
databasequestion
5 Posts 2 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.
  • D Offline
    D Offline
    deepaks3
    wrote on last edited by
    #1

    Hi, I am accpting date from the user in a form. And i want to display the data in crystal reports month wise, in which i want the month names to be the column. Ex: SNo Name Amount Date Jan Feb Mar Apr ..... Is there any way by which i can achive this output by sql query...?:confused:

    Deepak Surana

    C 1 Reply Last reply
    0
    • D deepaks3

      Hi, I am accpting date from the user in a form. And i want to display the data in crystal reports month wise, in which i want the month names to be the column. Ex: SNo Name Amount Date Jan Feb Mar Apr ..... Is there any way by which i can achive this output by sql query...?:confused:

      Deepak Surana

      C Offline
      C Offline
      ChandraRam
      wrote on last edited by
      #2

      deepaks3 wrote:

      I am accpting date from the user in a form. And i want to display the data in crystal reports month wise, in which i want the month names to be the column. Ex: SNo Name Amount Date Jan Feb Mar Apr ..... Is there any way by which i can achive this output by sql query...?

      Try using the GROUP BY clause on Month(YourDateFieldHere) in your SQL query

      D 1 Reply Last reply
      0
      • C ChandraRam

        deepaks3 wrote:

        I am accpting date from the user in a form. And i want to display the data in crystal reports month wise, in which i want the month names to be the column. Ex: SNo Name Amount Date Jan Feb Mar Apr ..... Is there any way by which i can achive this output by sql query...?

        Try using the GROUP BY clause on Month(YourDateFieldHere) in your SQL query

        D Offline
        D Offline
        deepaks3
        wrote on last edited by
        #3

        By Using Group BY i will get the data in the form of rows, but i want each month amount in the corresponding month.

        Deepak Surana

        C 1 Reply Last reply
        0
        • D deepaks3

          By Using Group BY i will get the data in the form of rows, but i want each month amount in the corresponding month.

          Deepak Surana

          C Offline
          C Offline
          ChandraRam
          wrote on last edited by
          #4

          deepaks3 wrote:

          By Using Group BY i will get the data in the form of rows, but i want each month amount in the corresponding month.

          You might also want to look up Pivot Tables and their usage...

          D 1 Reply Last reply
          0
          • C ChandraRam

            deepaks3 wrote:

            By Using Group BY i will get the data in the form of rows, but i want each month amount in the corresponding month.

            You might also want to look up Pivot Tables and their usage...

            D Offline
            D Offline
            deepaks3
            wrote on last edited by
            #5

            ya that will solve my problem i guess.. thanks a ton

            Deepak Surana

            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