Re: Problem with Column Names

2010-06-07 Thread Mark Thornton
quot;; String cmdSQL = 'Create 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

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
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 tab

Re: Truncating CLOB error

2010-05-06 Thread Mark Thornton
On 06/05/2010 14:21, Kristian Waagan wrote: Hi Mark, Derby is only allowed to truncate whitespace. If it needs to truncate non-whitespace characters to make the value fit, it will throw an exception (not a warning). Ah, thanks. I seem to remember that some databases will truncate anything

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: 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 tha

Truncating CLOB error

2010-05-06 Thread Mark Thornton
cuteUpdateX(Unknown S 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: Case Sensitivity

2010-03-24 Thread Mark Thornton
idable. Mark Thornton

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

2009-08-28 Thread Mark Thornton
, you only 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
Until Vista arrived this rule has 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
rse having to read/decode the index pages). Mark Thornton

Re: Derby speedup by not using page caches?

2009-03-02 Thread Mark Thornton
cache 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
uoted identifiers so other JPA implementations may differ. Mark Thornton

Re: Why close ResultSet & PreparedStatement?

2008-11-29 Thread Mark Thornton
database connection, you'll trigger the clean up process. You are over optimistic. It is depressingly common for applications to fail if ResultSet's aren't closed aggressively. While Oracle is the usual whipping boy for this behaviour, it is by no means unique. Mark Thornton

Re: Why close ResultSet & PreparedStatement?

2008-11-29 Thread Mark Thornton
[EMAIL PROTECTED] wrote: 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 Huh? I'm sorry but

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: Creating multiple indexes with different names on the same column does nothing.

2008-11-01 Thread Mark Thornton
names you could have different indexes for each language that you choose to support. OK, Derby doesn't support this (I do in a special database used for geographical information). Mark Thornton

Re: Date 2042-10-12 problem using Brasilia time zone

2008-10-31 Thread Mark Thornton
oblem otherwise (short term). Long term, an option might be to fix the problem in java.sql.Date. The long term solution is probably jsr310 which replaces all the date/time classes with something more rational. 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
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
imits." 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: Case-Insensitive Unique Constraint

2008-01-17 Thread Mark Thornton
columns or allowing UNIQUE index creation using UPPER/LOWER. Another alternative would be to allow a collation to be specified when creating an index. Mark Thornton

Re: Howto get existing table names

2007-12-28 Thread Mark Thornton
at null is explicitly mentioned for all the other parameters. I seem to remember that some JDBC drivers throw an exception if you use a null tableNamePattern parameter. Mark Thornton

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
f the field is lost from the SQL perspective. Mark Thornton

Re: Double.NaN in table?

2007-12-19 Thread Mark Thornton
2005 checks 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
float/double fields. (i.e. positive/negative infinity or NaN). It is very annoying. Mark Thornton

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

2007-11-14 Thread Mark Thornton
name 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
more 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,

Alter table add constraints

2007-08-16 Thread Mark Thornton
at line 4, column 1. SQL-92 only allowed one alteration per alter table statement, I don't have a copy of later standards. Regards, Mark Thornton

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

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 " of ISO/IEC 9075-2:200

float precision

2007-08-15 Thread Mark Thornton
LOAT Although an 8 byte IEEE 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

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

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

2007-08-10 Thread Mark Thornton
faster! A bit disappointing really. Mark Thornton

Re: Sum of time

2007-07-19 Thread Mark Thornton
ith Crystal 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: 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

Re: locking problem when selecting data

2007-06-07 Thread Mark Thornton
elect. Mark Thornton

Re: null-columns in select-statement

2007-06-07 Thread Mark Thornton
help. Kay Standard SQL-92 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

storesMixedCaseQuotedIdentifiers() should return false

2007-05-31 Thread Mark Thornton
uot; 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