Fetch array elements
Andreas Säger <[email protected]> Mon, 14 Dec 2015 12:52:52 +0100
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, Is it possible to get a single element returned by function REGEXP_SUBSTRING_ARRAY? SELECT IP, CARDINALITY(REGEXP_SUBSTRING_ARRAY( IP, '\d+')) AS "CARDINALITY" FROM IP_LOG For any valid IPv4 address, the above query returns 4. I'd like to access the 1st, second, third or 4th element in SQL. Thanks, Andreas ------------------------------------------------------------------------------