Skip to main content
January 26, 2009
Question

MySQL over to SQL Server

  • January 26, 2009
  • 1 reply
  • 847 views
I have recently moved from using MySQL 5.0 over to SQL Server 2008. It seems that my query code doesn't work anymore. Am I supposed to write my cfquery commands in a different format when I am using SQL Server? If so, what is the format?
    This topic has been closed for replies.

    1 reply

    Inspiring
    January 26, 2009
    bje98f wrote:
    > I have recently moved from using MySQL 5.0 over to SQL Server 2008. It seems
    > that my query code doesn't work anymore. Am I supposed to write my cfquery
    > commands in a different format when I am using SQL Server? If so, what is the
    > format?
    >

    If they are basic ANSI 92 SQL code then, no you should not have to
    re-write them

    If you have a lot of sophisticated sql code that makes use of unique
    MySQL features, then yes you have to rewrite them into similar SQL
    Server constructs or forgo what can not be ported.

    But as I have no idea of what you SQL looks like I can't say which might
    be the case.
    January 27, 2009
    well normally this code that works fine in MySQL to create me a table called threads doesn't work. I now get this message:

    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '`'.

    Any suggestions?


    Participating Frequently
    January 27, 2009
    Shot in the dark here but I think this may have something to do with the 'type' of apostrophe that is being used, i.e. the difference between

    '

    and

    `

    I saw this once before when using MySQL inserts but it was a long time ago, so I reserve the right to be wrong on this one. :-)