Need logic [message #307826] |
Thu, 20 March 2008 01:54 |
vjay
Messages: 16 Registered: December 2007 Location: chennai
|
Junior Member |
|
|
Hi ,
i want give one parameter (Name) from that parameter i want to display all the possible combinations any order .if any one have like this logic please post.
Ex;-RAJ
RJA
JAR
JRA
ARJ
AJR
Thanks,
Vjay.
|
|
|
|
|
Re: Need logic [message #307844 is a reply to message #307830] |
Thu, 20 March 2008 02:41 |
vjay
Messages: 16 Registered: December 2007 Location: chennai
|
Junior Member |
|
|
CREATE OR REPLACE FUNCTION Getname(v_name IN VARCHAR) RETURN char
IS
v_Number NUMBER(10);
v_Str VARCHAR(100);
BEGIN
SELECT LENGTH(v_name) INTO v_Number FROM dual;
FOR I IN 0..v_Number LOOP
DBMS_OUTPUT.PUT_LINE ( 'Name'||);
END LOOP;
RETURN (v_name);
END;
Thanks,
Vijay
|
|
|
|
Re: Need logic [message #307885 is a reply to message #307842] |
Thu, 20 March 2008 04:29 |
vjay
Messages: 16 Registered: December 2007 Location: chennai
|
Junior Member |
|
|
i getting this error .for this need any grants??
1 with
2 data as (select substr('&val',level,1) letter, level rn
3 from dual
4 connect by level <= length('&val')
5 )
6 select replace(sys_connect_by_path(letter,'/'),'/','')perm
7 from data
8 where level = length('&val')
9* connect by nocycle prior rn != rn
SQL> /
old 2: data as (select substr('&val',level,1) letter, level rn
new 2: data as (select substr('vijay',level,1) letter, level rn
old 4: connect by level <= length('&val')
new 4: connect by level <= length('vijay')
old 8: where level = length('&val')
new 8: where level = length('vijay')
SQL*Plus internal error state 2091, context 0:0:0
Unsafe to proceed
|
|
|
|
Re: Need logic [message #307901 is a reply to message #307894] |
Thu, 20 March 2008 05:22 |
vjay
Messages: 16 Registered: December 2007 Location: chennai
|
Junior Member |
|
|
ok Thanks.....
But i executed that code in Toad ,In Toad the result set is coming 0('0 rows selected' ).
|
|
|