Re: MySQL TO_DAYS() emulation in Derby

2006-09-18 Thread Robert Enyedi
Dan, I did not know of the JDBC escape functions. These work indeed with Derby, however the MySQL JDBC driver does not seem to support them (we need to run our queries on both Derby and MySQL). I know that this is not the best place to ask, but does anyone happen to know more about the

Re: MySQL TO_DAYS() emulation in Derby

2006-09-18 Thread Robert Enyedi
Donald, Thanks for the code snippet. This is also what I tried to do. However, a modification is required so that the timezone is explicitly set: Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(UTC)); Otherwhise the miliseconds will be those from your own timezone (which most

Re: MySQL TO_DAYS() emulation in Derby

2006-09-18 Thread Robert Enyedi
Dan, My timestamp computations were all local, but as mentioned in my previous post I managed to solve the issue. Regards, Robert Daniel John Debrunner wrote: Robert Enyedi wrote: This is exactly what I've been trying to do. The difficulty which I'm unable to overcome yet is that the

Re: GROUP_BY with user functions

2006-09-18 Thread Øystein Grøvlen
Robert Enyedi wrote: If I need to group the values returned by the MY_USER_FUNCTION, I simply cannot do so because the following query is invalid in Derby: SELECT MY_USER_FUNCTION(t1.field1) AS MY_VALUE FROM T1 GROUP BY MY_VALUE I have not tried this, but maybe something like this will

Re: GROUP_BY with user functions

2006-09-18 Thread Robert Enyedi
Thanks for the tip. I tried this, but it has the same problem with alias referencing. Regards, Robert Øystein Grøvlen wrote: Robert Enyedi wrote: If I need to group the values returned by the MY_USER_FUNCTION, I simply cannot do so because the following query is invalid in Derby: SELECT

Re: GROUP_BY with user functions

2006-09-18 Thread Fernanda Pizzorno
Have you tried this? SELECT my_value FROM (SELECT MY_USER_FUNCTION(t1.field1) AS my_value FROM T1) AS UserFunction GROUP BY my_value Regards, - Fernanda Robert Enyedi wrote: Thanks for the tip. I tried this, but it has the same problem with alias referencing. Regards, Robert

Re: GROUP_BY with user functions

2006-09-18 Thread Øystein Grøvlen
Robert Enyedi wrote: Thanks for the tip. I tried this, but it has the same problem with alias referencing. Sorry, I should have tried this first. Fernanda has given you the right solution. -- Øystein

Re: GROUP_BY with user functions

2006-09-18 Thread Robert Enyedi
Wow, this really works. Thanks a lot, Fernanda! I just wonder why the alias propagation works well in this scenario and with the obvious one it does not. Regards, Robert Fernanda Pizzorno wrote: Have you tried this? SELECT my_value FROM (SELECT MY_USER_FUNCTION(t1.field1) AS my_value

Re: GROUP_BY with user functions

2006-09-18 Thread Robert Enyedi
No problem. Thanks anyway! Regards, Robert Øystein Grøvlen wrote: Robert Enyedi wrote: Thanks for the tip. I tried this, but it has the same problem with alias referencing. Sorry, I should have tried this first. Fernanda has given you the right solution. -- Øystein

Insert large using SQL

2006-09-18 Thread Radek Terber
I need insert large text (over 100 KB) into column type CLOB (created as max. available size - cca 2GB) using SQL command, but derby (latest release) inserts only cca 32 KB. If text is larger, derby throws SQL exception with description 'A string constant starting with ''inserted text ... ' is

Re: Insert large using SQL

2006-09-18 Thread Thomas Kellerer
Radek Terber wrote on 18.09.2006 14:09: I need insert large text (over 100 KB) into column type CLOB (created as max. available size - cca 2GB) using SQL command, but derby (latest release) inserts only cca 32 KB. If text is larger, derby throws SQL exception with description 'A string

Re: Semi-OT: Java/Derby Web Hosting

2006-09-18 Thread Barry Books
I use JuicyVPS. It's $10/month for a root account so you'll have to set everything up. I've been using them for about a year with no complaints. I've tried a few others and they are the best so far. I run several Tapestry/Derby projects there.

Re: MySQL TO_DAYS() emulation in Derby

2006-09-18 Thread Lance J. Andersen
MySQL does support JDBC escape functions in their JDBC driver. Robert Enyedi wrote: Dan, I did not know of the JDBC escape functions. These work indeed with Derby, however the MySQL JDBC driver does not seem to support them (we need to run our queries on both Derby and MySQL). I know that

Re: Insert large using SQL

2006-09-18 Thread Radek Terber
Thanks for response, but i have NO acces to database over JDBC, but only via text stream, thus i MUST use SQL commands (e.g. INSERT INTO (...) VALUES (...) ). I cannot call metgods of JDBC driver directly. Thomas Kellerer wrote: Radek Terber wrote on 18.09.2006 14:09: I need insert

RE: Insert large using SQL

2006-09-18 Thread Michael Segel
-Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 10:25 AM To: Derby Discussion Subject: Re: Insert large using SQL Thanks for response, but i have NO acces to database over JDBC, but only via text stream, thus i MUST use SQL

Re: Insert large using SQL

2006-09-18 Thread Radek Terber
Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 10:25 AM To: Derby Discussion Subject: Re: Insert large using SQL Thanks for response, but i have NO acces to database over JDBC, but only via text stream, thus i

RE: Insert large using SQL

2006-09-18 Thread Michael Segel
-Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 10:56 AM To: Derby Discussion Subject: Re: Insert large using SQL Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday,

Re: Insert large using SQL

2006-09-18 Thread Radek Terber
Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 10:56 AM To: Derby Discussion Subject: Re: Insert large using SQL Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED]

Re: Insert large using SQL

2006-09-18 Thread Radek Terber
Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 11:21 AM To: Derby Discussion Subject: Re: Insert large using SQL Michael Segel wrote: -Original Message- From: Radek Terber [mailto:[EMAIL PROTECTED]

ASF web sites and wikis are inaccessible

2006-09-18 Thread Jean T. Anderson
ASF infra volunteers know about the problem. If you want to monitor status, ajax is the machine to watch: http://monitoring.apache.org/status/ -jean

Best Practice: Embedded Derby Location?

2006-09-18 Thread Daniel Jue
Hi, I would like to use Derby to store some web application meta-info, and I think I'd like to have it embedded (only my web app's POJOs will access it). It's gonna store simple text like menu urls and global user preferences, which I was previously storing in XML files deployed with my