liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseExcepti on: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t .id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Inc orrect syntax near the keyword 'select'.

JIRA | Gary L. Klesczewski | 4 years ago
  1. 0

    For the following change set: <changeSet id="3" author="glk"> <addColumn tableName="FLIGHT" schemaName="ADS_RTCRD"> <column name="SEAT_QTY" type="BIGINT" defaultValueNumeric="10"> <constraints nullable="false" /> </column> </addColumn> <addColumn tableName="FLIGHT_HIST" schemaName="ADS_RTCRD"> <column name="SEAT_QTY" type="BIGINT"> <constraints nullable="true" /> </column> </addColumn> </changeSet> The following SQL was generated: ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysob jects d, sysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t .type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT' GO ALTER TABLE [ADS_RTCRD].[FLIGHT] DROP COLUMN [SEAT_QTY] GO MSSQL returns the following exception stack: Liquibase Update Failed: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CON STRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t. id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'select'. SEVERE 3/4/13 3:20 PM:liquibase: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_ QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'select'. liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseExcepti on: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t .id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Inc orrect syntax near the keyword 'select'. at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:401) at liquibase.changelog.visitor.RollbackVisitor.visit(RollbackVisitor.jav a:23) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.rollback(Liquibase.java:255) at liquibase.integration.commandline.Main.doMigration(Main.java:851) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: liquibase.exception.DatabaseException: Error executing SQL ALTER TABL E [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, s ysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'se lect'. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:109 1) at liquibase.database.AbstractDatabase.executeRollbackStatements(Abstrac tDatabase.java:1115) at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:388) ... 5 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax nea r the keyword 'select'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServ erStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQ LServerStatement.java:792) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute (SQLServerStatement.java:689) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe rverConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLSer verStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLS erverStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStat ement.java:662) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInSta tement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more

    JIRA | 4 years ago | Gary L. Klesczewski
    liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseExcepti on: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t .id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Inc orrect syntax near the keyword 'select'.
  2. 0

    For the following change set: <changeSet id="3" author="glk"> <addColumn tableName="FLIGHT" schemaName="ADS_RTCRD"> <column name="SEAT_QTY" type="BIGINT" defaultValueNumeric="10"> <constraints nullable="false" /> </column> </addColumn> <addColumn tableName="FLIGHT_HIST" schemaName="ADS_RTCRD"> <column name="SEAT_QTY" type="BIGINT"> <constraints nullable="true" /> </column> </addColumn> </changeSet> The following SQL was generated: ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysob jects d, sysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t .type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT' GO ALTER TABLE [ADS_RTCRD].[FLIGHT] DROP COLUMN [SEAT_QTY] GO MSSQL returns the following exception stack: Liquibase Update Failed: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CON STRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t. id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'select'. SEVERE 3/4/13 3:20 PM:liquibase: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_ QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'select'. liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseExcepti on: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t .id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Inc orrect syntax near the keyword 'select'. at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:401) at liquibase.changelog.visitor.RollbackVisitor.visit(RollbackVisitor.jav a:23) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.rollback(Liquibase.java:255) at liquibase.integration.commandline.Main.doMigration(Main.java:851) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: liquibase.exception.DatabaseException: Error executing SQL ALTER TABL E [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, s ysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Incorrect syntax near the keyword 'se lect'. at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:109 1) at liquibase.database.AbstractDatabase.executeRollbackStatements(Abstrac tDatabase.java:1115) at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:388) ... 5 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax nea r the keyword 'select'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServ erStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQ LServerStatement.java:792) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute (SQLServerStatement.java:689) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe rverConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLSer verStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLS erverStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStat ement.java:662) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInSta tement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more

    JIRA | 4 years ago | Gary L. Klesczewski
    liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseExcepti on: Error executing SQL ALTER TABLE [dbo].[FLIGHT] DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t .id AND d.type='D' AND t.type='U' AND c.name='SEAT_QTY' AND t.name='FLIGHT': Inc orrect syntax near the keyword 'select'.
  3. 0

    Spago Server 4.0 & MSSQL Server> Incorrect syntax near the word 'AS' with every query-related action

    spagoworld.org | 8 months ago
    com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'AS'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 1690#176127452

    GitHub | 10 months ago | ruan0011
    liquibase.exception.DatabaseException: The object 'UQ__user__AB6E6164EA813277' is dependent on column 'email'. [Failed SQL: ALTER TABLE [dbo].[user] ALTER COLUMN [email] [varchar](128)]
  6. 0

    GitHub comment 1690#176601458

    GitHub | 10 months ago | ruan0011
    liquibase.exception.DatabaseException: The object 'UQ__user__AB6E6164EA813277' is dependent on column 'email'. [Failed SQL: ALTER TABLE [dbo].[user] ALTER COLUMN [email] [varchar](128)]

    9 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.microsoft.sqlserver.jdbc.SQLServerException

      Incorrect syntax nea r the keyword 'select'.

      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError()
    2. com.microsoft.sqlserver
      SQLServerStatement.execute
      1. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
      2. com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
      3. com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:792)
      4. com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689)
      5. com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
      6. com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
      7. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
      8. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
      9. com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:662)
      9 frames
    3. Liquibase Core
      Main.main
      1. liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)
      2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)
      4. liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)
      5. liquibase.database.AbstractDatabase.executeRollbackStatements(AbstractDatabase.java:1115)
      6. liquibase.changelog.ChangeSet.rollback(ChangeSet.java:388)
      7. liquibase.changelog.visitor.RollbackVisitor.visit(RollbackVisitor.java:23)
      8. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
      9. liquibase.Liquibase.rollback(Liquibase.java:255)
      10. liquibase.integration.commandline.Main.doMigration(Main.java:851)
      11. liquibase.integration.commandline.Main.main(Main.java:134)
      11 frames