Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I think I need something like CONCAT_WS

720481Sep 2 2009 — edited Sep 30 2010
Hi all, I have the following function:

create or replace
FUNCTION "INT2IP" ( address IN VARCHAR2 )
RETURN VARCHAR2
IS
BEGIN
RETURN div(address,16777216);
RETURN (mod(address,16777216) - mod(mod(address,16777216),65536)) / 65536;
RETURN (mod(mod(address,16777216),65536) - mod(mod(mod(address, 16777216), 65536), 256)) / 256;
RETURN mod(mod(address,65536),256);
END;

which ofcourse isn't working like it should, as u could probably tell by seeing 4 return statements ;)

however, my wish is to use all 4 return statements, connected to each other with dots ( '.' ).
I believe in MySQL there is a function CONCAT_WS for that, but I can't find an oracle equivalent to that.

anyone any idea?
This post has been answered by Frank Kulash on Sep 2 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2010
Added on Sep 2 2009
6 comments
4,400 views