Home » SQL & PL/SQL » SQL & PL/SQL » procedure - subset of string ? (10g)
procedure - subset of string ? [message #315041] Fri, 18 April 2008 13:42 Go to next message
McLan
Messages: 36
Registered: April 2008
Member
How can I find out str1 is part of(subset of) str2 ?
I searched in the google but not found any information that helps me.
Here is the sample code , I need a condition that can be used for IF statement in the below code.
DECLARE
STR1 VARCHAR2;
STR2 VARCHAR2;

BEGIN
STR2 := ‘firstname’;
STR1 := ‘firstname lastname’;

IF STR1 part of STR2 THEN
	dbms_Output.Put_Line(‘STR1 is subset of STR2’);
END IF;

END;
/

Please suggest me the condition that I can use in IF statement

Thanks
McLan
Re: procedure - subset of string ? [message #315043 is a reply to message #315041] Fri, 18 April 2008 13:44 Go to previous messageGo to next message
McLan
Messages: 36
Registered: April 2008
Member
small correction in the code:
STR1 := ‘firstname’;
STR2 := ‘firstname lastname’;

Re: procedure - subset of string ? [message #315044 is a reply to message #315041] Fri, 18 April 2008 13:45 Go to previous message
Michel Cadot
Messages: 64116
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
INSTR

Given the questions you posted the 2 days, you should read the description of all the functions.

Regards
Michel
Previous Topic: regarding pragma_exception_init
Next Topic: BULK COLLECT SLOWER THAN FOR CURSOR LOOP
Goto Forum:
  


Current Time: Tue Dec 06 02:34:27 CST 2016

Total time taken to generate the page: 0.12028 seconds