Home » Developer & Programmer » Reports & Discoverer » Substr (Forms 6i, Database 9i)
Substr [message #574630] Mon, 14 January 2013 07:30 Go to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
Hi Guyz,

i have the below record in my datababase

     ID_NO
----------
2170757419


have another 10 items (F_1, F_2,F_3.....F_10)in my reports i want the above ID_NO in those 10 items with single digit in every F_1 to F_10, have the below procedure but how can code in reports i'm not much familiar with reports. anyone help me to solve my problem.

SELECT SUBSTR(':ID_NO', 1,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 2,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 3,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 4,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 5,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 6,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 7,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 8,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 9,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 10,1)FROM DUAL;
SELECT SUBSTR(':ID_NO', 11,1)FROM DUAL;



Regards


Re: Substr [message #574631 is a reply to message #574630] Mon, 14 January 2013 07:35 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If I understood the questioncorrectly, one option is to create a formula column for each of these F_1, ... F_10, such as
-- F_1:
return substr(:id_no, 1, 1);

-- F_2
return substr(:id_no, 2, 1);

etc.
Re: Substr [message #574633 is a reply to message #574631] Mon, 14 January 2013 07:45 Go to previous message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
thanks Little.....it works.....
Previous Topic: printer ip
Next Topic: Remote program SRPCERC failed with reason
Goto Forum:
  


Current Time: Sat Nov 30 05:16:18 CST 2024