Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » APEX_UTIL
APEX_UTIL [message #454511] Thu, 06 May 2010 03:40 Go to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
Hello every one.

i am working in oracle 10g, and i dont find Apex_UTIL, So what should i do for that,

Thanks and

Regards.

[Updated on: Thu, 06 May 2010 03:48]

Report message to a moderator

Re: APEX_UTIL [message #454519 is a reply to message #454511] Thu, 06 May 2010 03:53 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
I think apex_util is a synonym for htmldb_util which is a package.

APEX's HTMLDB_UTIL package
Re: APEX_UTIL [message #454522 is a reply to message #454519] Thu, 06 May 2010 03:56 Go to previous messageGo to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
Thanks sir
Aacatually i need it to create a function which convert the comma seperated list of value into nasted table.
Re: APEX_UTIL [message #454525 is a reply to message #454522] Thu, 06 May 2010 03:59 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
BilalKhan wrote on Thu, 06 May 2010 03:56
Thanks sir
Aacatually i need it to create a function which convert the comma seperated list of value into nasted table.


Check comma seperated list ofcourse you will have to write some extra code for that.
Re: APEX_UTIL [message #454529 is a reply to message #454525] Thu, 06 May 2010 04:02 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
you can write function with following code.

SET SERVEROUTPUT ON
DECLARE
  l_list1   VARCHAR2(50) := 'A,B,C,D,E,F,G,H,I,J';
  l_list2   VARCHAR2(50);
  l_tablen  BINARY_INTEGER;
  l_tab     DBMS_UTILITY.uncl_array;
BEGIN
  DBMS_OUTPUT.put_line('l_list1 : ' || l_list1);

  DBMS_UTILITY.comma_to_table (
     list   => l_list1,
     tablen => l_tablen,
     tab    => l_tab);

  FOR i IN 1 .. l_tablen LOOP
    DBMS_OUTPUT.put_line(i || ' : ' || l_tab(i));
  END LOOP;

  DBMS_UTILITY.table_to_comma (
     tab    => l_tab,
     tablen => l_tablen,
     list   => l_list2);

  DBMS_OUTPUT.put_line('l_list2 : ' || l_list2);
END;
/

Re: APEX_UTIL [message #454530 is a reply to message #454525] Thu, 06 May 2010 04:03 Go to previous messageGo to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
Sir if u dont mind then please help me to create that function i.e String_to_table convert the comma seperated list of value into nasted table.

Thanks
Re: APEX_UTIL [message #454534 is a reply to message #454525] Thu, 06 May 2010 04:04 Go to previous messageGo to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
Thanks sir.
Sir if you dont mind then please help me to create the function which convert the comma seperated list of value into nasted table.
Re: APEX_UTIL [message #454538 is a reply to message #454534] Thu, 06 May 2010 04:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As this has been answered many times, help you in searching by yourself.

In addition, rahulvb just provided a solution, but maybe it has been too subtle too.

Regards
Michel
Re: APEX_UTIL [message #454542 is a reply to message #454538] Thu, 06 May 2010 04:13 Go to previous messageGo to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
ok thanks. sir please tell me that apex_util is avalivable in oracle 10g or not.

Thanks Miche and rahulvb
Re: APEX_UTIL [message #454563 is a reply to message #454542] Thu, 06 May 2010 05:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator


/forum/fa/1620/0/

Re: APEX_UTIL [message #454575 is a reply to message #454563] Thu, 06 May 2010 05:53 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Laughing
Re: APEX_UTIL [message #454643 is a reply to message #454575] Thu, 06 May 2010 12:41 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Be aware of DBMS_UTILITY.comma_to_table limitations!
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    l_list1   VARCHAR2(50) := 'AAA,BBB,CCC , DDD';
  3    l_tablen  BINARY_INTEGER;
  4    l_tab     DBMS_UTILITY.uncl_array;
  5  BEGIN
  6    DBMS_OUTPUT.put_line('l_list1 : ' || l_list1);
  7
  8    DBMS_UTILITY.comma_to_table (
  9       list   => l_list1,
 10       tablen => l_tablen,
 11       tab    => l_tab);
 12  END;
 13  /
l_list1 : AAA,BBB,CCC , DDD

PL/SQL procedure successfully completed.

SQL> DECLARE
  2    l_list1   VARCHAR2(50) := '1,2,3BB';
  3    l_tablen  BINARY_INTEGER;
  4    l_tab     DBMS_UTILITY.uncl_array;
  5  BEGIN
  6    DBMS_OUTPUT.put_line('l_list1 : ' || l_list1);
  7
  8    DBMS_UTILITY.comma_to_table (
  9       list   => l_list1,
 10       tablen => l_tablen,
 11       tab    => l_tab);
 12  END;
 13  /
l_list1 : 1,2,3BB
DECLARE
*
ERROR at line 1:
ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 125
ORA-06512: at "SYS.DBMS_UTILITY", line 160
ORA-06512: at "SYS.DBMS_UTILITY", line 202
ORA-06512: at line 8


SQL> DECLARE
  2    l_list1   VARCHAR2(50) := 'create,table,for';
  3    l_tablen  BINARY_INTEGER;
  4    l_tab     DBMS_UTILITY.uncl_array;
  5  BEGIN
  6    DBMS_OUTPUT.put_line('l_list1 : ' || l_list1);
  7
  8    DBMS_UTILITY.comma_to_table (
  9       list   => l_list1,
 10       tablen => l_tablen,
 11       tab    => l_tab);
 12  END;
 13  /
l_list1 : create,table,for
DECLARE
*
ERROR at line 1:
ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 125
ORA-06512: at "SYS.DBMS_UTILITY", line 160
ORA-06512: at "SYS.DBMS_UTILITY", line 202
ORA-06512: at line 8


SQL>


Re: APEX_UTIL [message #454645 is a reply to message #454643] Thu, 06 May 2010 12:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Not dbms_utility, APEX_UTIL, don't you understand! Twisted Evil

Regards
Michel

(Just joking)
Re: APEX_UTIL [message #454766 is a reply to message #454645] Fri, 07 May 2010 05:53 Go to previous messageGo to next message
BilalKhan
Messages: 18
Registered: April 2010
Location: Pakistan
Junior Member
Sir i create the function but it display the error message

SQL> ed
Wrote file afiedt.buf

  1  Create or replace function STRING_TO_TABLE(pi_string in varchar2)
  2  Return varchar2
  3  is
  4    l_tablen  BINARY_INTEGER;
  5    l_tab     DBMS_UTILITY.uncl_array;
  6  BEGIN
  7    DBMS_UTILITY.comma_to_table (
  8       list   => pi_string,
  9       tablen => l_tablen,
 10       tab    => l_tab);
 11    FOR i IN 1 .. l_tablen LOOP
 12      l_tab(i) := pi_string;
 13    END LOOP;
 14* END STRING_TO_TABLE ;
SQL> /

Function created.




SQL> ed
Wrote file afiedt.buf

  1  create table x1
  2  (
  3  value varchar2(200)
  4* )
  5  /

Table created.

SQL> insert into x1 values('&value');
Enter value for value: 32,36,12,65,85,9663


1 row created.

SQL> /
Enter value for value: 43,36,89,65,112,9663


1 row created.

SQL> /
Enter value for value: 36,63,12,65,95,123


1 row created.


SQL> /
Enter value for value: 32,36,12,85, 85,9663

1 row created.

SQL> select * from x1;

VALUE                                                           
----------------------------------------------
32,36,12,65,85,9663 
43,36,89,65,112,9663
36,63,12,65,95,123
32,36,12,85, 85,9663


SQL> select STRING_TO_TABLE(value) from x1;
select STRING_TO_TABLE(value) from x1
       *
ERROR at line 1:
ORA-00931: missing identifier 
ORA-06512: at "SYS.DBMS_UTILITY", line 125 
ORA-06512: at "SYS.DBMS_UTILITY", line 160 
ORA-06512: at "SYS.DBMS_UTILITY", line 202 
ORA-06512: at "SCOTT.STRING_TO_TABLE", line 7 

So please help me.
Thanks and Regards.

Re: APEX_UTIL [message #454799 is a reply to message #454766] Fri, 07 May 2010 08:46 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Take a look at my posting above again. Try using A,B,C in your example.
Re: APEX_UTIL [message #455076 is a reply to message #454766] Mon, 10 May 2010 01:53 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
http://forums.oracle.com/forums/thread.jspa?threadID=1069495

sriram
Re: APEX_UTIL [message #463751 is a reply to message #454511] Sat, 03 July 2010 01:35 Go to previous messageGo to next message
BBMamun
Messages: 94
Registered: February 2010
Location: Dhaka, Bangladesh
Member
Hi Bilal Khan, May be your problem is, where do I get the document to learn how to use APEX_UTIL package ?? Am I right? if that is the case then
go to %apex path where u unzipped Apex%\apex\doc (D:\apex_32\apex\doc)and double click index.html then look for API References there you will find lots of references to learn from.


Hasan Al Mamun
Programmer
Bangladesh Bank
Dhaka, Bangladesh

[Updated on: Sat, 03 July 2010 01:37]

Report message to a moderator

Re: APEX_UTIL [message #463832 is a reply to message #454511] Sun, 04 July 2010 11:55 Go to previous message
BBMamun
Messages: 94
Registered: February 2010
Location: Dhaka, Bangladesh
Member
Try previous post

Regards

[Updated on: Sun, 04 July 2010 11:57]

Report message to a moderator

Previous Topic: How to restrict access to pages/ items in pages
Next Topic: apex charts tool tip
Goto Forum:
  


Current Time: Thu Mar 28 15:07:34 CDT 2024