Bug Report: SQL Error(156): Wrong Syntax in the near of keyword DEFAULT

[expired user #9751]'s profile image [expired user #9751] posted 8 years ago in General Permalink

Hi, many thanks for your great work.

If you use the dialog to alter a column in a sql server table and try to set the default value to '' then the following error message occured:

[Window Title]
MsSQL-Test: Fehler

[Content]
SQL Fehler (156): Incorrect syntax near the keyword.

[OK]

[Footer]
Google Suche nach diesem Fehler

Perhaps you use the same Sql-Command generator for mysql and mssql. On Stackoverflow I found this snippet:

ALTER TABLE {TABLENAME} 
ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL} 
CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
[WITH VALUES]

Perhaps this will solve the issue?

Regards, Spotlight

[expired user #9751]'s profile image [expired user #9751] posted 8 years ago Permalink

[EDIT] The error occured with Version 9.3.0.4984 (64-bit) on Windows 7.

Hi, many thanks for your great work.

If you use the dialog to alter a column in a sql server table and try to set the default value to '' then the following error message occured:

[Window Title]
MsSQL-Test: Fehler

[Content]
SQL Fehler (156): Incorrect syntax near the keyword.

[OK]

[Footer]
Google Suche nach diesem Fehler

Perhaps you use the same Sql-Command generator for mysql and mssql. On Stackoverflow I found this snippet:

ALTER TABLE {TABLENAME} 
ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL} 
CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
[WITH VALUES]

Perhaps this will solve the issue?

Regards, Spotlight

RevitArkitek's profile image RevitArkitek posted 5 years ago Permalink

When I try to reorder a column and click Save I also get this error. I do not know much about writing SQL statements. Please let me know if there is a way to fix the syntax. Thanks.

Version 10.1.0.5464 (64 Bit) Windows 10 Enterprise 1709

Please login to leave a reply, or register at first.