How to get only the block name [message #82920] |
Thu, 17 July 2003 10:35 |
Leonard Martin
Messages: 45 Registered: May 2002 Location: Canada
|
Member |
|
|
Hello
I store the cursor item in a field. sometimes i require to get only the block name from this item...however i do not want to use :system.cursor_block..
How do i only get the block name from the value stored in the item which holds the blockname.cursor item ??
Thanks in advance
|
|
|
Re: How to get only the block name [message #82923 is a reply to message #82920] |
Thu, 17 July 2003 19:03 |
Shailender Mehta
Messages: 49 Registered: June 2003
|
Member |
|
|
To extract the block name from the value stored in the item which holds the blockname.cursor item, you can use the INSTR function.
i.e. Value stored in the field is 'BLOCK.Client_Id';
1 select Substr('BLOCK.Client_Id', 1, Instr('BLOCK.Client_Id', '.')-1)
2* from dual
Test Db>/
SUBST
-----
BLOCK
Test Db>ed
Wrote file afiedt.buf
1 select Substr('CUSTOMER.Client_Id', 1, Instr('CUSTOMER.Client_Id', '.')-1)
2* from dual
Test Db>/
SUBSTR('
--------
CUSTOMER
Test Db>
|
|
|