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. to get latest version of product

to get latest version of product

Scheduled Pinned Locked Moved Database
helpannouncement
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.
  • C Offline
    C Offline
    chandru70
    wrote on last edited by
    #1

    Hi Friends I have table containing prd_id,version_no Now I want to get product,and their latest version_no how go about kindly help me regards chandru

    S 1 Reply Last reply
    0
    • C chandru70

      Hi Friends I have table containing prd_id,version_no Now I want to get product,and their latest version_no how go about kindly help me regards chandru

      S Offline
      S Offline
      shally_79
      wrote on last edited by
      #2

      dear chandru, i cannot understand ur question fully.if the version is an integer number u can draw the maximum value using max() function.can u pls describe ur question in detail

      shally

      C 1 Reply Last reply
      0
      • S shally_79

        dear chandru, i cannot understand ur question fully.if the version is an integer number u can draw the maximum value using max() function.can u pls describe ur question in detail

        shally

        C Offline
        C Offline
        chandru70
        wrote on last edited by
        #3

        Hi shally thank you for replying take for example i have these details in my table prd_id prD_name ver_no 01 abc 1.5 01 abc 2.4 02 xyz 1.0 02 xyz 1.2 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 i need latest version of each product like 01 abc 2.4 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 hope u understood thank you regards chandru

        S 1 Reply Last reply
        0
        • C chandru70

          Hi shally thank you for replying take for example i have these details in my table prd_id prD_name ver_no 01 abc 1.5 01 abc 2.4 02 xyz 1.0 02 xyz 1.2 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 i need latest version of each product like 01 abc 2.4 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 hope u understood thank you regards chandru

          S Offline
          S Offline
          shally_79
          wrote on last edited by
          #4

          hello chandru, pls use the following query if u find any errors pls reply me select prd_id,prD_name,max(ver_no) from products group by prd_id,prD_name :)

          shally

          C 1 Reply Last reply
          0
          • S shally_79

            hello chandru, pls use the following query if u find any errors pls reply me select prd_id,prD_name,max(ver_no) from products group by prd_id,prD_name :)

            shally

            C Offline
            C Offline
            chandru70
            wrote on last edited by
            #5

            dear shally yes, it is working thank you very much chandru:)

            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