Pregunta

I use a MySQL DB with jdbc and have select statement that looks like: 'SELECT id, name, INET_ATON(user_ip) AS user_ip_long FROM my_table;' witch works perfectly, but for testing purpose I would like to use a derby DB aswell.

Since derby doesn't support inet_aton() I would like to know if ther is any workaround to use an inet_aton() function with derby?

¿Fue útil?

Solución

You can write user-defined functions in Derby. Here's a nice blog with lots of step-by-step information: http://www.danvega.org/blog/2010/2/17/Creating-Apache-Derby-Custom-Functions-Part-2

And here's the Derby reference manual docs for the subject: http://db.apache.org/derby/docs/10.10/ref/rrefcreatefunctionstatement.html

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top