SQL Language (MOSC)

MOSC Banner

Using ESCAPE sequence

edited Jun 6, 2013 4:30AM in SQL Language (MOSC) 4 commentsAnswered
Hi All, Please see the SQL and the output below.

  select target_name,  global_name,
  replace( target_name, substr(target_name, instr(target_name,'.world_'), length(target_name) ) , '.world') newtarget
  from MGMT$DB_DBNINSTANCEINFO
   where target_type != 'rac_database'
   and target_name like '%.world%'
  order by database_name asc ,host asc, instance_name asc , target_type desc
SQL> /

TARGET_NAME                    GLOBAL_NAME                    NEWTARGET
------------------------------ ------------------------------ ------------------------------
acingprd.world                 ACINGPRD.WORLD                 .world
clmdev1.world                  CLMDEV1.WORLD                  .world
clmdev10.world                 CLMDEV10.WORLD                 .world
clmdev11.world                 CLMDEV11.WORLD                 .world
clmdev12.world                 CLMDEV12.WORLD                 .world
clmtst3.world_clmtst31         CLMTST3.WORLD                  clmtst3.world

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center