문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top