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
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
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
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
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
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
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
idable.
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
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
rse
having to read/decode the index pages).
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
uoted identifiers so other
JPA implementations may differ.
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
[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
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
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
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
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
default Collator for a
locale is a better basis for sorting than either upper or lower case.
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
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
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
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
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.
f the field is lost from the
SQL perspective.
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
float/double fields. (i.e. positive/negative infinity or NaN). It is
very annoying.
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
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
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
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,
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
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
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
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
,
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
faster! A bit disappointing really.
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
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
elect.
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
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
43 matches
Mail list logo