Convert comma separated string to array in pl sql or vice versa aka Array on oracle 10g


  Hi there now day i have a little problem with my documentations.
i rarely noted my work and then when the case came my head is exploding.

before it came too late i wanna note this my experiences about Convert comma separated string to array in pl sql or vice versa.

First Case


I have simple query A,B,C,D and i would like to return the results in one row, like this

XXX
------------
A
B
C
D

f_convert

/* Create the output TYPE, here using a VARCHAR2(100) nested table type */

SQL> CREATE TYPE test_type AS TABLE OF VARCHAR2(100);
   /

Type created.

/* Now, create the function.*/

SQL> CREATE OR REPLACE FUNCTION f_convert(p_list IN VARCHAR2)
      RETURN test_type
    AS
      l_string       VARCHAR2(32767) := p_list || ',';
      l_comma_index  PLS_INTEGER;
      l_index        PLS_INTEGER := 1;
      l_tab          test_type := test_type();
    BEGIN
      LOOP
       l_comma_index := INSTR(l_string, ',', l_index);
       EXIT WHEN l_comma_index = 0;
       l_tab.EXTEND;
       l_tab(l_tab.COUNT) := SUBSTR(l_string, l_index, l_comma_index - l_index);
       l_index := l_comma_index + 1;
     END LOOP;
     RETURN l_tab;
   END f_convert;
   /

Function created.

/* Prove it works */

SQL> SELECT * FROM TABLE(f_convert('A,B,C,D'));

COLUMN_VALUE
--------------------------------------------------------------------------------
A
B
C

D


Second Case

i have
XXX
------------
A
B
C
D

and i would like to return the result like A,B,C,D

String agg

1.

CREATE OR REPLACE TYPE t_string_agg AS OBJECT
(
  g_string  VARCHAR2(32767),

  STATIC FUNCTION ODCIAggregateInitialize(sctx  IN OUT  t_string_agg)
    RETURN NUMBER,

  MEMBER FUNCTION ODCIAggregateIterate(self   IN OUT  t_string_agg,
                                       value  IN      VARCHAR2 )
     RETURN NUMBER,

  MEMBER FUNCTION ODCIAggregateTerminate(self         IN   t_string_agg,
                                         returnValue  OUT  VARCHAR2,
                                         flags        IN   NUMBER)
    RETURN NUMBER,

  MEMBER FUNCTION ODCIAggregateMerge(self  IN OUT  t_string_agg,
                                     ctx2  IN      t_string_agg)
    RETURN NUMBER
);
/
SHOW ERRORS

2.

CREATE OR REPLACE TYPE BODY t_string_agg IS
  STATIC FUNCTION ODCIAggregateInitialize(sctx  IN OUT  t_string_agg)
    RETURN NUMBER IS
  BEGIN
    sctx := t_string_agg(NULL);
    RETURN ODCIConst.Success;
  END;

  MEMBER FUNCTION ODCIAggregateIterate(self   IN OUT  t_string_agg,
                                       value  IN      VARCHAR2 )
    RETURN NUMBER IS
  BEGIN
    SELF.g_string := self.g_string || ',' || value;
    RETURN ODCIConst.Success;
  END;

  MEMBER FUNCTION ODCIAggregateTerminate(self         IN   t_string_agg,
                                         returnValue  OUT  VARCHAR2,
                                         flags        IN   NUMBER)
    RETURN NUMBER IS
  BEGIN
    returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
    RETURN ODCIConst.Success;
  END;

  MEMBER FUNCTION ODCIAggregateMerge(self  IN OUT  t_string_agg,
                                     ctx2  IN      t_string_agg)
    RETURN NUMBER IS
  BEGIN
    SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
    RETURN ODCIConst.Success;
  END;
END;
/
SHOW ERRORS

3.

CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
RETURN VARCHAR2
PARALLEL_ENABLE AGGREGATE USING t_string_agg;
/
SHOW ERRORS


How to use

select string_AGG(X) from xxx


Done!

source :
Comma to array
#http://stackoverflow.com/questions/3819375/convert-comma-separated-string-to-array-in-pl-sql
#
http://stackoverflow.com/questions/468990/how-can-i-combine-multiple-rows-into-a-comma-delimited-list-in-oracle
String_agg (arry to comma)
#https://oracle-base.com/articles/misc/string-aggregation-techniques

How to install Java 6 (6u27) on your browser Firefox Ubuntu

https://ubuntuforums.org/showthread.php?t=1904467

Internet explorer stopped working when opening oracle forms 10g windows7

Basically , When U run oracle forms 10g and it shows blank or Stop working on your browser, because Jinit on oracle 10g is not support on that browser. . .

I googled a little and found those problems. . .
Now i will share U how to work  your oracle form 10g on your PC
Basic OS
*Win7
*Oracle Developer 10g
*Java Runtime 6u27

The Idea is finding How to Run oracle form 10g in Mozilla or Any browser

1.

Install Java Environment 
2.
Change The Formsweb.cfg
3.
Add the plugin in browser



source : https://www.youtube.com/watch?v=lzyHQ2PcWHI

How to install oracle developer suite 10g on windows 7

How to install oracle developer suite 10g on windows 7

Actually, I have a little bit problem when i try to install oracle developer suite 10g.
I found error that my system does not support, but now i found the solutions.
It needs a little tricks that will decoy Oracle Standard system required.

Come Let 's Start



1.

Go to "oracle developer suite 10g  Installer Folder"\Install\oraparam.ini


 2.

Find :
[Certified Versions]
Windows=5.0,5.1,5.2
Solaris=5.8,5.9
Linux=redhat-2.1AS
HPUX=B.11.11
 Add this script :
[Certified Versions]
Windows=5.0,5.1,5.2,4.1
Solaris=5.8,5.9
Linux=redhat-2.1AS
HPUX=B.11.11


Find :
[Windows-5.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
SWAP_SPACE=1535
TEMP_SPACE=150
Edit :
[Windows-6.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
SWAP_SPACE=1535
TEMP_SPACE=150
 Save and exit file.

 3.

Add Virtual memory size
Go To Advanced system settings >>Tab " Advanced ">>Button Performance's "Setting">>Tab " Advanced ">>Button "Change"
Initial size = 4000
Max size = 4000

Ok and restart your PC.

 4.

 Go to "oracle developer suite 10g  Installer Folder
Set Property file Compatibility as "Windows XP Console Pack 2" 

 5.

 Run Setup


6.

Done!

#Source : https://www.youtube.com/watch?v=qYeic14YK-Y

How to crack Office 2016 on Windows 10

How to crack Office 2016 on Windows 10

:) Hi there,
Today i will share "How to crack Office 2016 on Windows 10"
I think it will come piece of cake, then only thing that you need is downloading RE-Loader 1.4 RC3.

Then let us start!!!


1.

Shutdown your antivirus or you can just disable it.

2.

Disable Windows defender
Follow this way if you have difficulty in Disabling Windows defender :)
https://www.aplikasipc.com/cara-mengaktifkan-menonaktifkan-windows-defender-real-time-protection-di-windows-10/

3.

Run RE-Loader 1.4 RC3.
Choose checkbox "016"
Push Button "Active"

4. 

Done!!!

How to Install AMD ATI Radeon Graphics Drivers in Ubuntu

:) hi fellas
I have Lenovo G40 AMD A8 and i wanna install my laptop with Linux Mint 17.2
as like as ubuntu 14.20.
Unfortunately, i have a problem with graphics driver using ubuntu 14.20.

Now i will share you How to Install AMD ATI Radeon Graphics Drivers in Ubuntu.

1. 

sudo add-apt-repository ppa:org-edger/ppa
sudo apt-get update

2.

sudo apt-get install fglrx

3.

Reboot your computer and done :)

Note :

If you installed the wrong driver or make some others mistake.
you should delete your driver using this command
sudo  aticonfig --uninstall
Reboot your computer
sudo shutdown -r now