The name_part() can be used to disecting parts of a three part names (string where items are divided by dots ".") such as table names or columns names. The table name "DB"."DBA"."SYS_USERS" contains three parts which can be extracted individually using this function providing the correct index from a 0 base: 0 would return "DB", 1 would return "DBA", 2 would return "SYS_USERS".
A string will be returned containing the text from the specified index.
This simple example shows the 3 parts of a table name being retrieved using the name_part() function from ISQL.
SQL> select name_part('"DB"."DBA"."SYS_TABLES"', 0);
callret
VARCHAR
__________________________________________________________
"DB"
1 Rows. -- 20 msec.
SQL> select name_part('"DB"."DBA"."SYS_TABLES"', 1);
callret
VARCHAR
__________________________________________________________
"DBA"
1 Rows. -- 30 msec.
SQL> select name_part('"DB"."DBA"."SYS_TABLES"', 2);
callret
VARCHAR
__________________________________________________________
SYS_TABLES"
1 Rows. -- 20 msec.