sql « derby « Java Database Q&A





1. How to get the hour difference between 2 datetimestamp on derby db?    stackoverflow.com

I have a sql question on derby database:

Select a.name, a.starttime, a.endtime
From a
How can I add to the above sql statement such that I can get the difference in hours between the ...

2. How to convert the time difference to hours(with 2 decimal place) in derby?    stackoverflow.com

I am using timestampdiff in derby db to retrieve the time difference between 2 time: startdate, and enddate. e.g. startdate = 2010-02-23 02:59:52.045 enddate = 2010-02-23 03:45:39.898

select {fn timestampdiff(SQL_TSI_HOUR, startdate, enddate)} as ...

3. VARCHAR does not work as expected in Apache Derby    stackoverflow.com

I'm having this same problem:

How can I truncate a VARCHAR to the table field length AUTOMATICALLY in Derby using SQL? To be specific: ...

4. Apache Derby: Create SQL Dump with data    stackoverflow.com

is there any easy way to create a complete SQL Dump from an apache Derby DB? Using the dblook tool, I managed to dump the database schema to a sql file, ...

5. Best Design for Passing Filter Set into Database Class for SQL use    stackoverflow.com

I'm developing a FlashCard App. Part of this is giving the user the option to filter results on difficulty level and category (more options in the future probably). See the image ...

6. Why does using a prepared statement fail with nulls and succed with GStrings?    stackoverflow.com

The problem in a nutshell: This is what happens when trying to insert a row with a few null columns using a prepared statement and groovy.sql.Sql:

groovy:000> val
===> [123123123, 2, null, 0, 0, ...

7. Resultset not open. Verify Autocommit is OFF. Apache Debry    stackoverflow.com

I am using apache derby for my database. I am able to perform inserts into the database. The following is the excerpt from the code that attempts to display the contents ...

8. java.sql.SQLIntegrityConstraintViolationException    stackoverflow.com

I am getting this error when running a save insert/update command:

SEVERE: null
java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key ...

9. How to use SEQUENCE in Apache Derby?    stackoverflow.com

I'd like to use SEQUENCE support in Apache Derby 10.7. I've created the sequence with the following statement:

CREATE SEQUENCE SAMPLE_SEQ AS INT MAXVALUE 999999 CYCLE;
How can I select next/current value from ...





10. how to execute several sql files on Derby DB?    stackoverflow.com

I have many table creation scripts (sql files), which I would like to run, in order to create a db structure. Is there a good way of doing it with Derby DB? I ...

11. What is the Derby equivalent to CREATE OR REPLACE?    stackoverflow.com

Does anyone know the Derby equivalent for the following?

CREATE OR REPLACE VIEW myView AS SELECT ...
My internet searching hasn't found anything clear. Wondering if I may have to do something similar ...

12. Derby database management tool    stackoverflow.com

is there any management tool for Derby database like razorSQL ? I tried to use razorSQL, but it seems to be a not good choice for me.