0
MySQL over to SQL Server

/t5/coldfusion-discussions/mysql-over-to-sql-server/td-p/117865
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
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?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/mysql-over-to-sql-server/m-p/117866#M11219
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
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.
> 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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/mysql-over-to-sql-server/m-p/117867#M11220
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
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?
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '`'.
Any suggestions?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
/t5/coldfusion-discussions/mysql-over-to-sql-server/m-p/117868#M11221
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
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. :-)
'
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. :-)
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
LATEST
/t5/coldfusion-discussions/mysql-over-to-sql-server/m-p/117869#M11222
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
bje98f wrote:
> Error Executing Database Query.
> [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '`'.
There are some ddl differences between MySQL and MS SQL. MS SQL typically use square brackets, for escape characters, not '`' . There may be differences in reserved words as well.
> id` INT UNSIGNED NOT NULL AUTO_INCREMENT
> `minipic` BLOB NULL ,
You will also find slight differences in data types. IIRC, MS SQL does not have native "unsigned" types The MS SQL equivalent of BLOB is either image or varbinary, depending on sql server version. As far as keywords go, MS SQL uses "identity" rather than auto_increment. But they are roughly the same.
Do a search on MySQL to MS SQL migration. It should turn up a fair number of comparison guides highlighting the differences between the two databases (syntax, ddl, data types, etcetera).
> Error Executing Database Query.
> [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '`'.
There are some ddl differences between MySQL and MS SQL. MS SQL typically use square brackets, for escape characters, not '`' . There may be differences in reserved words as well.
> id` INT UNSIGNED NOT NULL AUTO_INCREMENT
> `minipic` BLOB NULL ,
You will also find slight differences in data types. IIRC, MS SQL does not have native "unsigned" types The MS SQL equivalent of BLOB is either image or varbinary, depending on sql server version. As far as keywords go, MS SQL uses "identity" rather than auto_increment. But they are roughly the same.
Do a search on MySQL to MS SQL migration. It should turn up a fair number of comparison guides highlighting the differences between the two databases (syntax, ddl, data types, etcetera).
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

