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. Access query convert to MSSQL query

Access query convert to MSSQL query

Scheduled Pinned Locked Moved Database
databasesql-serverquestion
2 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.
  • R Offline
    R Offline
    Ray Raymos
    wrote on last edited by
    #1

    I have a little bit of SQL code and I am having trouble bringing it over to MSSQL. I don't even know where to being I know that the SELECT, FROM , GROUP BY and HAVING will be in the MSSSQL query. However I know for a fact the 4th line will change into @param1 and @param2. If anyone would like to add some input into this would be nice. Access Query

    Select COUNT(') AS Result, Username AS UsernameInput, [Password]
    FROM access
    GROUP BY Username, [Password]
    Having (COUNT(') = 1) AND (Username = ?) AND ([Password] = ?)

    M 1 Reply Last reply
    0
    • R Ray Raymos

      I have a little bit of SQL code and I am having trouble bringing it over to MSSQL. I don't even know where to being I know that the SELECT, FROM , GROUP BY and HAVING will be in the MSSSQL query. However I know for a fact the 4th line will change into @param1 and @param2. If anyone would like to add some input into this would be nice. Access Query

      Select COUNT(') AS Result, Username AS UsernameInput, [Password]
      FROM access
      GROUP BY Username, [Password]
      Having (COUNT(') = 1) AND (Username = ?) AND ([Password] = ?)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Change the single quote ' to an asterisk * in the count functions. eg count(*)

      Never underestimate the power of human stupidity RAH

      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