Reputation: 111
I'm having trouble of finding a way to get the substring from a hostname.
The hostname is of the format oraclehost.server.region.net
,which is the full server name(FQDN).
From this I want to retrieve the short hostname which is oraclehost
Can you please suggest?
Upvotes: 0
Views: 181
Reputation: 1269693
Because the code mentions Oracle, I will suggest an Oracle solution:
select regexp_substr(hostname, '^[^.]+')
Upvotes: 3