Thanks for your information.
The dates I am passing to the scripts are in the correct format,and the
dates which are kept in my metadatavalue table whith the
metadata_field_id=11 are :
ETADATA_VALUE_ID ITEM_ID METADATA_FIELD_ID TEXT_VALUE
TEXT_LANG
PLACE
----------------- ---------- -----------------
--------------------------------------------------------------------------------
---------------------------------------------------------------- ----------
46 21 11 2007-09-06T10:22:34Z
1
420 42 11 2007-09-10T12:05:46Z
1
158 25 11 2007-09-06T14:58:42Z
1
292 23 11 2007-09-10T11:08:29Z
1
311 41 11 2007-09-10T11:08:49Z
1
529 43 11 2007-09-10T12:26:59Z
1
604 44 11 2007-09-10T12:41:50Z
1
------------------------------------------------------------------------------------
I can´t find what is wrong with this dates, I think they have the rigth
format.
When I copy the query that is being executed when I run the statistics in
the dspace in the sql+ worksheet, it runs correctly and gives me the right
result. This is the query:
SELECT COUNT(*) AS num FROM item WHERE in_archive = 1 AND withdrawn = 0 AND
item_id IN ( SELECT item_id FROM metadatavalue WHERE metadata_field_id = (
SELECT metadata_field_id FROM metadatafieldregistry WHERE element = 'date'
AND qualifier = 'accessioned') AND TO_TIMESTAMP( TO_CHAR(text_value),
'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) > TO_DATE('2007-09-01', 'yyyy-MM-dd') AND
TO_TIMESTAMP( TO_CHAR(text_value), 'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) <
TO_DATE('2007-10-21', 'yyyy-MM-dd') )
I am completely lost.
Thank you very much for your help.
Andrea Garrido
>From: Graham Triggs <
gra...@biomedcentral.com>
>To: Andrea Garrido Fernández <
dreac...@hotmail.com>
>CC:
dspac...@lists.sourceforge.net
>Subject: Re: [Dspace-tech] Problem with statistics
>Date: Tue, 11 Sep 2007 09:42:50 +0100
>
>Hi,
>
>Well, the relevant part of this is the only thing that's not in
>English!! But the context is clear enough - it's having trouble parsing
>a valid date.
>
>Can you confirm that the start / end dates that you are passing to the
>script are of the form 'yyyy-mm-dd'.
>
>If your input is valid, then you've got a problem with one of the
>metadata value fields. You'll need to check the text_value of all the
>dc.date.accessioned entries (probably metadata_field_id=11). It looks
>like the offending item is of the correct format (yyyy-mm-ddThh:mi:ssZ),
>but contains invalid data.
>
>G
>
>On Mon, 2007-09-10 at 08:49 +0000, Andrea Garrido Fernández wrote:
> > Hi:
> > I have a problem when I try to execute the perl scripts for generating
> > statistics.
> > When I try to run the LogAnalyser class with a start or end date, I have
>an
> > error like this:
> >
> > java.sql.SQLException: ORA-01841: el valor (completo) del año debe
> > don´t recognize this expression.
_________________________________________________________________
Acepta el reto MSN Premium: Correos más divertidos con fotos y textos
increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis.
http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_correosmasdivertidos