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. Need help with View <noobie></noobie>

Need help with View <noobie></noobie>

Scheduled Pinned Locked Moved Database
tutorialdatabasealgorithmshelpquestion
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.
  • L Offline
    L Offline
    Ltek
    wrote on last edited by
    #1

    Very new to SQL and I learn by example but cannot find anything like this after tons of searching. I have an Excel workbook of software application names and versions. Many have the same 'root' name but different version number. e.g. root = "McAfee VirusScan" sheet columns... APP NAME -- VERSION # -- MANUF -- INSTALL COUNT I think a View might be best(?) but no idea how to code it. The View needs to SUM the INSTALL COUNTs for all similar APP NAMEs & VERSIONs(similar determined by using first few characters or something - options here?) example: McAfee VirusScan v1.01 21259 McAfee VirusScan v3.20 14234 ... There are thousands of APPs. I will not know all the possible versions. Anyone do this before and have some example code or could help? Thx in advance!

    B T 2 Replies Last reply
    0
    • L Ltek

      Very new to SQL and I learn by example but cannot find anything like this after tons of searching. I have an Excel workbook of software application names and versions. Many have the same 'root' name but different version number. e.g. root = "McAfee VirusScan" sheet columns... APP NAME -- VERSION # -- MANUF -- INSTALL COUNT I think a View might be best(?) but no idea how to code it. The View needs to SUM the INSTALL COUNTs for all similar APP NAMEs & VERSIONs(similar determined by using first few characters or something - options here?) example: McAfee VirusScan v1.01 21259 McAfee VirusScan v3.20 14234 ... There are thousands of APPs. I will not know all the possible versions. Anyone do this before and have some example code or could help? Thx in advance!

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

      How can I understand you your query should be something like this: Select sum(Installcount) from Tablename group by version If this don't help you then post your data how is stored on table and post result which you want to get.


      I Love T-SQL "Don't torture yourself,let the life to do it for you."

      1 Reply Last reply
      0
      • L Ltek

        Very new to SQL and I learn by example but cannot find anything like this after tons of searching. I have an Excel workbook of software application names and versions. Many have the same 'root' name but different version number. e.g. root = "McAfee VirusScan" sheet columns... APP NAME -- VERSION # -- MANUF -- INSTALL COUNT I think a View might be best(?) but no idea how to code it. The View needs to SUM the INSTALL COUNTs for all similar APP NAMEs & VERSIONs(similar determined by using first few characters or something - options here?) example: McAfee VirusScan v1.01 21259 McAfee VirusScan v3.20 14234 ... There are thousands of APPs. I will not know all the possible versions. Anyone do this before and have some example code or could help? Thx in advance!

        T Offline
        T Offline
        TheFM234
        wrote on last edited by
        #3

        Select AppName, Version, Sum(InstallCount)
        From table
        Group By AppName, Version
        OrderBy AppName

        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