Results 1 to 5 of 5

Thread: Dashes in sql statement when using paramters causes HY010 sql error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Feb 2009
    Location
    Florida, USA
    Posts
    695

    Default Re: Dashes in sql statement when using paramters causes HY010 sql error

    Hi Oscar,

    The dash in the parameter does not seem to be the problem. What is the error that you are getting?

    When I tried in either 20.1 or 19.1 (using driver build 6.3.0.25) I do not get any errors. I used MSSQL 2019 and our Customer table from Order Entry. The attached program ran without a problem. Can you try this to see what you get?

    PS: In the article https://docs.microsoft.com/en-us/tro...msidxs-queries, MS recommends using LIKE if dashes are part of the string:

    • Where non-alphanumeric character must be used in the search criteria (primarily the dash - character), use the Transact-SQL LIKE clause instead of the FULLTEXT or CONTAINS predicates.
    Attached Files Attached Files
    Last edited by Marcia Booth; 10-Jun-2022 at 03:27 PM.
    Regards,

    Marcia Booth (DAW)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •