vivek
vivek

Reputation: 111

how to split after delimiter

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

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269693

Because the code mentions Oracle, I will suggest an Oracle solution:

select regexp_substr(hostname, '^[^.]+')

Upvotes: 3

Related Questions