Skip to content

Instantly share code, notes, and snippets.

@stefan-mees
Created May 27, 2015 18:41
Show Gist options
  • Save stefan-mees/21fa6124a2f4e0ed52a2 to your computer and use it in GitHub Desktop.
Save stefan-mees/21fa6124a2f4e0ed52a2 to your computer and use it in GitHub Desktop.
Exasol INT2IPv4
select
concat(
BIT_AND(1054420290, 255)
, concat('.'
, concat(BIT_AND(floor(BIT_OR(1054420290, 255) / 256), 255)
, concat('.'
, BIT_AND(floor(BIT_OR(1054420290, 65535) / 65536), 255)
, concat('.'
, BIT_AND(floor(BIT_OR(1054420290, 16777215) / 16777216), 255)
)))))
from dual;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment