error in parameterized query

  • i am trying to execute simple query on server 2000

    select * from employee where salary = ?

    but the query gives following error:

    [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error.

    if anyone know the reason, then kindly do reply.

  • What application are you using to execute the query?

    How have you specified the value for your parameter?

  • Please do not cross post. It wastes people's time.

    Please direct replies to the following thread -

    Error in parameterised query (SQL 2000)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • i am using query analyzer and want to take a input from user during run time. according to that input, query should give the result

  • Query analyser does not work like MS Access does. See the reply to your other post on this.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply