A regex returning the first word from the address should do it: SQL> select regexp_substr('foo.bar.baz','\w*') from dual; REG --- fooSeems more elegant than all the instr(substr(instr()) stuff. I haven't thought through if there are any non-word (\w) characters that could potentially be in a DNS name.
-- Jeremiah Wilton ORA-600 Consulting http://www.ora-600.net Shivaswamy Raghunath wrote:
I need to get "instance" from ('instance.company.com <http://instance.company.com>') on SQLPLUS. How I can do this?
-- //www.freelists.org/webpage/oracle-l