Error 42x01 Syntax Error
Contents |
here for a quick overview of the site Help sql state 42x01 syntax error encountered Center Detailed answers to any questions you might have Meta
Error 42x01 Syntax Error Encountered Show At Line 1 Column 1
Discuss the workings and policies of this site About Us Learn more about Stack sql state 42x01 syntax error encountered foreign Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question derby error codes x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up In JavaDB apache derby I dont know what is causing a Error: Syntax error: Encountered “)”
Syntax Error Encountered
at line 30, column 1. SQLState: 42X01 up vote 1 down vote favorite CREATE TABLE "TravelerProfile" ( "idTravelerProfile" int NOT NULL, "AccountID" int NOT NULL, "GivenName" varchar(45) DEFAULT NULL, "FamilyName" varchar(45) DEFAULT NULL, "Title" varchar(45) DEFAULT NULL, "Department" varchar(45) DEFAULT NULL, "Position" varchar(45) DEFAULT NULL, "TravelBooker" varchar(45) DEFAULT NULL, "IDnumber" varchar(10) DEFAULT NULL, "BusinessAddress" varchar(255) DEFAULT NULL, "BusinessPhone" varchar(12) DEFAULT NULL, "BusinessFax" varchar(12) DEFAULT NULL, "BusinessEmail" varchar(45) DEFAULT NULL, "HomeAddress" varchar(255) DEFAULT NULL, "HomePhone" varchar(12) DEFAULT NULL, "HomeEmail" varchar(45) DEFAULT NULL, "MobilePhone" varchar(12) DEFAULT NULL, "SpouseName" varchar(45) DEFAULT NULL, "SpouseContactNumber" varchar(45) DEFAULT NULL, "SpouseEmail" varchar(45) DEFAULT NULL, "DoctorsName" varchar(45) DEFAULT NULL, "DoctorsConctactNumber" varchar(45) DEFAULT NULL, "DoctorsEmail" varchar(45) DEFAULT NULL, "KnownMedicalConditions" varchar(512) DEFAULT NULL, "AttachmentID" varchar(45) DEFAULT NULL, "DateCreated" timestamp DEFAULT NULL, "DateModified" timestamp DEFAULT NULL, PRIMARY KEY ("idTravelerProfile"), ); I keep getting this error. Error: Syntax error: Encountered ")" at
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn derby create table more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 42X01: Syntax error: Encountered “
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly https://community.oracle.com/thread/1323689 without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Java - JDBC Archive All PlacesOracle CommunityArchived ForumsJava - JDBC Archive This discussion is archived syntax error 10 Replies Latest reply on May 28, 2009 9:42 AM by 843859 Derby - Syntax error, why? 843859 Jan 21, 2015 7:19 AM Hello, I'm stumped as to why this doesn't work (the commented part works fine) try { String connn = "jdbc:derby:test;create=true"; Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); Connection connect = 42x01 syntax error DriverManager.getConnection( connn ); // Statement stat; // stat = connect.createStatement(); // stat.executeUpdate( "CREATE TABLE City ( NAME VARCHAR(35) NOT NULL )" ); // // Statement st; // st = connect.createStatement(); // st.executeUpdate("INSERT INTO City( Name ) " + // "VALUES( 'Amsterdam' )" ); // // PreparedStatement statement = connect.prepareStatement("SELECT Name FROM City"); // ResultSet resultSet = statement.executeQuery(); // while (resultSet.next()) { // System.out.println( resultSet.getString("Name") ); // } Statement stat; stat = connect.createStatement(); stat.executeUpdate( "CREATE TABLE weerstations ( "+ "stationsnummer VARCHAR(5) NOT NULL, "+ "voortzetting VARCHAR(5),"+ "naam String NOT NULL, "+ "positie string NOT NULL, "+ "terreinhoogte DOUBLE(2, 1), "+ "karakteristiek string NOT NULL, "+ "grondsoort string NOT NULL, "+ "barometer DOUBLE(3, 1), "+ "windmeetmast INT(2)" ); } catch( Exception e ) { e.printStackTrace(); } finally{ System.exit( 1); }The error it throws isjava.sql.SQLSyntaxErrorException: Syntax error: Encountered "String" at line 1, column 1