insert « derby « Java Database Q&A





1. Apache Derby: how can I do "insert if not exists"?    stackoverflow.com

I'm giving Apache Derby, aka JavaDB a spin. I can't seem to get around duplicate key issues when inserting records that may already exist. Is ...

2. SQL query to insert the available slots into a table (avail) from booked slots table    stackoverflow.com

I want a sql query to insert the available slots into a table (avail) from booked slots table. I have two tables .I have a book table with bookstarttime and bookendtime columns ...

3. Using Derby embedded, I can insert into a temporary table but not query after the insert    stackoverflow.com

I have a connection to an embedded derby database. I want to create a temporary table and learned that I have to use DECLARE GLOBAL TEMPORARY TABLE and prefix SESSION to the ...

4. Retrieve id of record just inserted into a Java DB (Derby) database    stackoverflow.com

I am connecting to a Java DB database with JDBC and want to retrieve the id (which is on auto increment) of the last record inserted. I see this is a ...

5. how to fix error when inserting DATETIME into db    stackoverflow.com

I am trying to to do this:

pr.setStartdate("2006-09-10T00:00:00");
I am getting this error:
java.sql.SQLDataException: The syntax of the string representation of a datetime value is incorrect.
any ideas on how to successfully insert would be ...

6. Get the ID of the record I have just inserted in Derby DB    stackoverflow.com

Possible Duplicate:
Retrieve id of record just inserted into a Java DB (Derby) database
I have a table in a Derby database with a column created:
id ...

7. INSERT, and get the auto-incremented value    stackoverflow.com

Consider the following table:

create table language (
    id integer generated always as identity (START WITH 1, INCREMENT BY 1),
    name long varchar,
    ...

8. Derby Bulk Insert    coderanch.com

Hi All, I have tried to create a table and bulk insert the table from a text file using derby. Here is my code, import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; public class SimpleApp { public String framework = "embedded"; public String driver = "org.apache.derby.jdbc.EmbeddedDriver"; public String protocol = "jdbc:derby:"; public static void main(String[] args) { ...

9. how to insert timestamp into derby databse    coderanch.com

I need to update a derby timestamp field with a java.sql.timestamp, but am getting this error when doing so SQLException e = java.sql.SQLSyntaxErrorException: Syntax error: Encountered "00" at line 1, column 43. java.sql.SQLSyntaxErrorException: Syntax error: Encountered "00" at line 1, column 43. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source) at DBServer.conversation.run(conversation.java:263) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered ...





10. Derby Database Bulk Insert    coderanch.com

Hi all, I'm new in this forum, but i've been using Java for a few years. Right now i'm developing an application that use an embebed Derby Database (if you see there is another database that fix better to the problem i describe below, i will be glad to check your sugestions), i need to insert in a table 15 million ...