Re: Problem with Column Names

2010-06-07 Thread Mark Thornton
On 07/06/2010 14:36, Brett Wooldridge wrote: It is not valid in SQL to have column name (or other identifiers) that begin with a numeric character. You're going to have to code specifically for this case. Quoted identifiers are (in standard SQL) permitted to be entirely numeric. create

Re: Problem with Column Names

2010-06-07 Thread Mark Thornton
On 07/06/2010 14:48, pb2208 wrote: That is the answer I expected, but dreaded. I really didn't want to write a lot of special code. Thanks for confirming. Fortunately it is also wrong The definitive answer is: http://db.apache.org/derby/docs/10.6/ref/crefsqlj1003454.html Mark Thornton

Re: Problem with Column Names

2010-06-07 Thread Mark Thornton
Table mytable (393 Decimal(3))'; String cmdSQL = 'Create Table mytable (\393\ Decimal(3))'; These all give me 'Unclosed Character Literal' error. String cmdSQL = Create Table mytable (\393\ Decimal(3)); assuming this is Java. Mark Thornton

Truncating CLOB error

2010-05-06 Thread Mark Thornton
ource) at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown So urce) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdat e(WrappedPreparedStatement.java:365) Any suggestions welcome. Mark Thornton

Re: Truncating CLOB error

2010-05-06 Thread Mark Thornton
On 06/05/2010 12:38, Marco Ferretti wrote: Hi some simple questions that could address the issue ( I am not familiar with that calendar system ) : are you using some ORM ? Did you check the table ? ( the size of the CLOB ) The ORM is Hibernate. I haven't checked the table, but I presume

Re: Truncating CLOB error

2010-05-06 Thread Mark Thornton
of Bedework. Would you expect Derby to be merely reporting a warning for the truncation and that it would be Hibernate that is promoting this to failure? Thanks, Mark Thornton

Re: Case Sensitivity

2010-03-24 Thread Mark Thornton
case is unavoidable. Mark Thornton

Re: Values in double fields are not stored as I specified.

2009-08-28 Thread Mark Thornton
have an approximation of the value. Thats' how 2.30 became 2.29952316284. This difference is called the roundoff error. In this particular case the original double value is also being cast to 'float' at some point and thus losing about 7 extra digits of accuracy. Mark Thornton

Re: Question about file permission

2009-04-10 Thread Mark Thornton
frequently been broken, not least by Microsoft themselves. For example, until recently SQLServer would put its databases in Program Files by default. Mark Thornton

Re: Index perfomance

2009-03-25 Thread Mark Thornton
to read/decode the index pages). Mark Thornton

Re: Derby speedup by not using page caches?

2009-03-02 Thread Mark Thornton
and using memory mapped files. Some of the challenges I see are: An easier target would be to use memory mapping for read only databases. There are a number of awkward issues with Java's memory mapping when the map is writable E.g.: http://bugs.sun.com/view_bug.do?bug_id=4724038 Mark Thornton

Re: derby and jpa

2009-01-26 Thread Mark Thornton
identifiers so other JPA implementations may differ. Mark Thornton

Re: Why close ResultSet PreparedStatement?

2008-11-29 Thread Mark Thornton
Amir Michail wrote: Hi, Is there any point in calling the close method on ResultSet and the close method of PreparedStatement? Amir You might later change the database to one where it matters much more. Mark Thornton

Re: any feedback on this?

2008-06-23 Thread Mark Thornton
useful as it then automatically applies to all comparisions/indexes involving the column. Allowing more options when specifying the database collation would be a useful starting point (as suggested by Debrunner). Mark Thornton

Re: case-insensitive searching

2008-06-10 Thread Mark Thornton
the default Collator for a locale is a better basis for sorting than either upper or lower case. Mark Thornton

Re: java.sql.SQLDataException: The resulting value is outside the range for the data type DOUBLE.

2008-01-28 Thread Mark Thornton
. The more interesting question is whether those limits should remain different or should they be brought into alignment with Java Double (and add +-infinite and NaN as well). Mark Thornton

Re: Case-Insensitive Unique Constraint

2008-01-17 Thread Mark Thornton
Mark Thornton wrote: Sai Pullabhotla wrote: Rick, Thanks for the advice on using a CHECK constraint. It surely helps ensuring the data integrity. Otherwise, I think this is very basic feature that every one would like to see, and it would help if Derby can handle this automatically using

Re: Howto get existing table names

2007-12-28 Thread Mark Thornton
Nik wrote: Hi, I apologize if this is too simple a question. I'm tring to make a statement to return all the tables in the database. I haven't been able to find how to do this yet. I was trying to use DataBaseMetaData, but the method seems to require the table names. Thank you in advance.

Re: Double.NaN in table?

2007-12-19 Thread Mark Thornton
for NaN and rejects it. As far as I can remember versions of SQL Server prior to 2000 did not allow NaN. My SQL Standard handbook (1992) contains no mention of any of the special floating point values. Odd given that IEEE arithmetic had been around for quite a while by that date. Mark Thornton

Re: Double.NaN in table?

2007-12-19 Thread Mark Thornton
of the field is lost from the SQL perspective. Mark Thornton

Re: What's the name of a column...

2007-11-14 Thread Mark Thornton
for that kind of columns? I did some searches with no success. Bye! That column doesn't have a name unless you write the query as something like select MAX(idstat) as maxIdStat from history Regards Mark Thornton

Re: how to remove a column

2007-09-07 Thread Mark Thornton
referencing the old table. drop the old table. Rename the new table to the old name. Add back constraints if required. I guess this wasn't what you wanted to know. Mark Thornton

Re: Problem with Webstart deployment

2007-08-22 Thread Mark Thornton
than one is the jar file containing the database explicitly specified in the JNLP file? WebStart takes no notice of ClassPath attributes in jar file manifests. Mark Thornton

Re: Alter table add constraints

2007-08-16 Thread Mark Thornton
Dag H. Wanvik wrote: Mark Thornton [EMAIL PROTECTED] writes: The syntax in the documentation (http://db.apache.org/derby/docs/dev/ref/rrefsqlj81859.html) implies that you can add more than one constraint in a single alter table Does it? If a syntactic element can be repeated

default (0)

2007-08-15 Thread Mark Thornton
, matrixID INTEGER NOT NULL, CONSTRAINT PK__ArcConstraintGro__762C88DA PRIMARY KEY (ConstraintGroupID) ) results in java.sql.SQLSyntaxErrorException: Syntax error: Encountered ( at line 5, column 34. Regards, Mark Thornton

float precision

2007-08-15 Thread Mark Thornton
floating point value has 52 explicit mantissa bits, there is also an implicit 1 bit, so 53 is the correct precision (at least that is my understanding) for normal values. http://issues.apache.org/jira/browse/DERBY-2287 suggests that someone thinks 52 is right answer. Mark Thornton

Re: default (0)

2007-08-15 Thread Mark Thornton
Dag H. Wanvik wrote: Mark Thornton [EMAIL PROTECTED] writes: Derby 10.2.2 appears to reject constant expressions enclosed in parentheses (which should still be constant). I think this is correct according to the SQL standard; in section 11.5 default clause of ISO/IEC 9075-2:2003

Re: default (0)

2007-08-15 Thread Mark Thornton
Dag H. Anvil's wrote: Mark Thornton [EMAIL PROTECTED] writes: The Derby documentation (10.3 http://db.apache.org/derby/docs/10.3/ref/rrefsqlj30540.html#rrefsqlj30540) has this [ [ WITH ] DEFAULT { ConstantExpression | NULL } Which indicates that something more than just a literal

Re: Insert into Table (identity,CLOB) impossible ?? how to ?

2007-08-10 Thread Mark Thornton
disappointing really. Mark Thornton

Re: Sum of time

2007-07-19 Thread Mark Thornton
Reports and I need the duration to be printed as hours, minutes and seconds (01:30:40), not as seconds/milliseconds. Your approach may fail if the duration reaches or exceeds 24 hours. Attempting to set a time field to a value greater than 24 hours often results in an exception. Mark Thornton

Re: null-columns in select-statement

2007-06-07 Thread Mark Thornton
doesn't appear to allow NULL in a select list. It can appear in a row value list, or as a case result, either of which might provide an alternative way of achieving the required outcome. Mark Thornton

Re: locking problem when selecting data

2007-06-07 Thread Mark Thornton
. Mark Thornton

Re: AW: locking problem when selecting data

2007-06-07 Thread Mark Thornton
on a database locking only the minimum necessary set of rows. This is determined by the database implementation and can change between releases. Mark Thornton

storesMixedCaseQuotedIdentifiers() should return false

2007-05-31 Thread Mark Thornton
For comparison, this method does return true for Microsoft's SQL Server, but then that doesn't conform to the SQL-92 standard. Regards, Mark Thornton