Hello Frederik,

For Oracle date columns, you should use formatted-date:

AcctColumnDef   SDATE,Timestamp,formatted-date,to_date('%e %m %Y %H:%M:%S', 'DD
MM YYYY HH24:MI:SS')


Hope that helps.

Cheers.

On Oct 17,  2:53pm, Hugh Irvine wrote:
> Subject: Fwd: (RADIATOR) Oracle to_date with integer-date's DateFormat?
>
> Mikey -
>
> as discussed
>
> Hugh
>
> ----------  Forwarded Message  ----------
> Subject: (RADIATOR) Oracle to_date with integer-date's DateFormat?
> Date: Mon, 16 Oct 2000 11:23:30 +0200
> From: "Anheuser, Frederik {POYN~Kaiseraugst}" <[EMAIL PROTECTED]>
>
>
> 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: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
> Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
>
>
>
>-- End of excerpt from Hugh Irvine


===
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.

Reply via email to