use Inline Java => <<'END_OF_JAVA_CODE' ; import java.sql.*; public class T20000JD { // Name of the user able to create, drop, and manipulate tables public static String sUser = "XXXXX"; public static String sPassword = "XXXXX"; public static void main(String args[]) throws ClassNotFoundException { String url = "jdbc:teradata://172.28.130.20/TMODE=TERA,DBS_PORT=1025,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW"; String sDropTbl = "DROP TABLE NED_COLL_TABLES.T_PM_TEST_TMP"; String sCreateTbl = "CREATE TABLE NED_COLL_TABLES.T_PM_TEST_TMP (empID INTEGER NOT NULL, " + "empName VARCHAR(30) NOT NULL, empDept VARCHAR(50) NOT NULL, " + "empJob VARCHAR(300), PRIMARY KEY(empID))"; String sCreateIdx = "CREATE INDEX (empName) ON employee"; String sCreateIdx2 = "CREATE UNIQUE INDEX (empName, empDept) ON employee"; try { System.out.println("\n Sample T20000JD: \n"); System.out.println(" Looking for the Teradata JDBC driver... "); Class.forName("com.teradata.jdbc.TeraDriver"); System.out.println(" JDBC driver loaded. \n"); System.out.println(" Attempting to connect to Teradata via" + " the JDBC driver..."); Connection con = DriverManager.getConnection(url, sUser, sPassword); System.out.println(" User " + sUser + " connected."); System.out.println(" Connection to Teradata established. \n"); try { Statement stmt = con.createStatement(); System.out.println(" Statement object created. \n"); try { try { System.out.println(" Dropping table if present: " + sDropTbl); // Executing the drop table command stmt.executeUpdate(sDropTbl); System.out.println(" Table dropped.\n"); } catch (SQLException ex) { while (ex != null) { System.out.println("\n Drop table exception " + "ignored: " + ex); System.out.println(" Error code: " + ex.getErrorCode()); System.out.println(" SQL State: " + ex.getSQLState()); System.out.println(" Message: " + ex.getMessage()); System.out.println(" Localized Message: " + ex.getLocalizedMessage()); System.out.println(" Stack Trace: "); ex.printStackTrace(); ex = ex.getNextException(); } System.out.println(" Table could not be dropped." + " Execution will continue...\n"); } System.out.println(" Creating table: " + sCreateTbl); stmt.executeUpdate(sCreateTbl); System.out.println(" Sample table created. \n"); System.out.println(" Creating table indexes: " + sCreateIdx + " " + sCreateIdx2); stmt.executeUpdate(sCreateIdx); stmt.executeUpdate(sCreateIdx2); System.out.println(" Table indexes created."); } finally { stmt.close(); System.out.println("\n Statement object closed. \n"); } } finally { System.out.println(" Closing connection to Teradata..."); con.close(); System.out.println(" Connection to Teradata closed. \n"); } System.out.println(" Sample T20000JD finished. \n"); } catch (SQLException ex) { System.out.println(); System.out.println("*** SQLException caught ***"); while (ex != null) { System.out.println(" Error code: " + ex.getErrorCode()); System.out.println(" SQL State: " + ex.getSQLState()); System.out.println(" Message: " + ex.getMessage()); ex.printStackTrace(); System.out.println(); ex = ex.getNextException(); } throw new IllegalStateException ("Sample failed.") ; } } // End main } // End class T20000JD END_OF_JAVA_CODE