Hi,
I would like to store Radius accounting data into an Oracle SQL database. However, I
cannot get the necessary "to_date" conversion to work with the (new) configurable
integer-date accounting column definition format, the quotes are always at the wrong
place. Can anybody send me a piece of code that works?
For example, I tried:
AcctColumnDef SDATE,Timestamp,integer-date,to_date('%e %m %Y %H:%M:%S', 'DD MM
YYYY HH24:MI:SS')
which gives me
Tue Oct 10 15:20:20 2000: DEBUG: do query is: insert into S_ACLOG
(SDATE)
values
('to_date(''10 10 2000 15:20:17'', ''DD MM YYYY HH24:MI:SS'')')
Tue Oct 10 15:20:20 2000: ERR: do failed for 'insert into S_ACLOG
(SDATE)
values
('to_date(''10 10 2000 15:20:17'', ''DD MM YYYY HH24:MI:SS'')')':
ORA-01858: a non-numeric character was found where a numeric was expected (DBD: oexec
error)
Using DateFormat is not successful either, because to_date is always quoted (quoting
the arguments of to_date leads to the same result as above):
DateFormat to_date(%e %m %Y %H:%M:%S, DD MM YYYY HH24:MI:SS)
AcctColumnDef SDATE,Timestamp,integer-date
This results in
Mon Oct 16 11:15:12 2000: DEBUG: do query is: insert into S_ACLOG
(SDATE)
values
('to_date(16 10 2000 11:15:09, DD MM YYYY HH24:MI:SS)')
DBD::Oracle::db do failed: ORA-01858: a non-numeric character was found where a
numeric was expected (DBD: oexec error) at Radius/SqlDb.pm line 237.
Mon Oct 16 11:15:12 2000: ERR: do failed for 'insert into S_ACLOG
(SDATE)
values
('to_date(16 10 2000 11:15:09, DD MM YYYY HH24:MI:SS)')': ORA-01858: a
non-numeric character was found where a numeric was expected (DBD: oexec error)
Is there any way of unquoting to_date? The generated insert statement should look
something like
insert into S_ACLOG (SDATE) values (to_date('16 10 2000 11:15:09', 'DD MM YYYY
HH24:MI:SS'))
Thanks for any help.
Regards,
Frederik Anheuser
--
Frederik Anheuser e-Mail: [EMAIL PROTECTED]
F. Hoffmann-La Roche AG Phone: +41 61 68-84104
POYN-A, Room 224/123 Fax: +41 61 68-83004
CH-4070 Basel, Switzerland URL: http://informatics.roche.com/remacc
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.
(RADIATOR) Oracle to_date with integer-date's DateFormat?
Anheuser, Frederik {POYN~Kaiseraugst} Mon, 16 Oct 2000 02:41:23 -0700
- Re: Fwd: (RADIATOR) Oracle to_date w... Anheuser, Frederik {POYN~Kaiseraugst}
- Re: Fwd: (RADIATOR) Oracle to_d... Mike McCauley
