Home » Developer & Programmer » Reports & Discoverer » substring of values (oracle10g forms and reports 9i)
substring of values [message #537875] Mon, 02 January 2012 05:32 Go to next message
lacchhii
Messages: 142
Registered: May 2009
Location: bangalore
Senior Member

hi,

I have a reference number of application number which is sent to 3 different address as outward number
for example application number is intimated to the office , the employee and the treasury. this number is generated as follows

P/11/10/133
P/11/10/133A
P/11/10/133B

in my outward report when i run it all three numbers are getting listed.

i want only P/11/10/133 to be listed and ignore the rest of the two. i tried to use SUBSTR(INOUT_NO,9), but it reads only from the left gives me only the number ie 133, 133A and 133B. i tried rtrim and ltrim but it only clears the extra space. how do i ignore the other two despatch numbers


thanks in advance
Re: substring of values [message #537876 is a reply to message #537875] Mon, 02 January 2012 05:37 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions162.htm

ind> select substr('P/11/10/133A',9,3) from dual;

SUB
---
133

1 row selected.

Read the Above URL.

Sriram

[Updated on: Mon, 02 January 2012 05:43]

Report message to a moderator

Re: substring of values [message #537914 is a reply to message #537876] Mon, 02 January 2012 21:33 Go to previous message
lacchhii
Messages: 142
Registered: May 2009
Location: bangalore
Senior Member

thanks a lot. it was so simple and i couldn't figure out. thanks once again
Previous Topic: reading image in the report
Next Topic: Report End with Error
Goto Forum:
  


Current Time: Fri May 29 15:46:48 CDT 2020