开发者

SQL Error Alter Table?

I have been trying to add columns to a table using some logic that produces this statement:

ALTER TABLE Master_List 
  ADD COLUMN Service VARCHAR(100) , 
             Vendor VARCHAR(100) , 
             Product VARCHAR(100) , 
             Service_Description VARCHAR(100) , 
             Level/Scale VARCHAR(100) , 
             SunGard_Contract_Schedule_ID VARCHAR(100) , 
             Application_Owner VARCHAR(100) , 
             Application_Servers VARCHAR(100) , 
             Required_Support/Dependencies VARCHAR(100);

whenever I have been trying to run it I continually get this error:

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition. at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3110) at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338) at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288) at Testing.main(Testing.java:54)

I have been check开发者_如何学Cing online for the proper format for the ALTER TABLE command, and the formatting seems to be correct, I have tried changing so many things I have run out of ideas of how to fix it....

The table name is Master_List, and none of those columns already exist inside it.

This is being used inside Java, incase that is relevant.


It could be the / in your column names that is giving you the problem


Your column names contain the "/" character, and that is not a valid character for column names.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜