SPLIT function

Hello
I have a background of table which is:

CREATE TABLE TRAINING
(SET THE STATUS TO VARCHAR2 (128 BYTE) NOT NULL,)
ACTIVATE THE DELETED NUMBER (1.0) NOT NULL,
THE PLAN_ID NUMBER ARGUMENT (10,0) NOT NULL ACTIVATE.
ACTIVATE THE VARCHAR2 (128 BYTE) TEXT NOT NULL,
COUT_PREVISIONNEL NUMBER (13.2).
DATE OF DATE_CREATION)
Values inserted INTO THE TRAINING (D, 0, 10, SOFTECH, 2000000, sysdate),.
(G, 0, 12, SOFTECH, 3000000, sysdate), (G, 1, 19, TECHNOLOGY, 60000, November 10, 10)
Here, I lead a dynamic search that will allow the front-end on PHP receive the string in this form:
(STATUS = G; statut_option = 2; LABEL = SOFTECH; COUT_PREVISIONNEL = 2000000) this chain of values represents the State requests and return the result as shown below:

RESULT:
STATUS PLAN_ID WORDING COUT_PREVISIONNEL
D 10 SOFTECH 2000000
G 12 SOFTECH 3000000
19 60000 G TECHNOLOGY
I'm under 10 gr 2 on Windows Server.
Kind regards

Yet another example:

declare
 params varchar2_table;
 l_pair varchar2_table;

begin
--getting param=value pairs
 params:= xt_regexp.split(
              'STATUT=G;SUPPRIM=0;PLAN_ID=12;LIBELLE=SOFTECH;COUT_PREVISIONNEL=3000000;DATE_CREATION=16/11/2010'
              ,
              ';'
          );
--for all pairs
 for i in params.first..params.last loop
--splitting param name and param value
   l_pair:=xt_regexp.split(params(i),'=');
-- just printing it
   dbms_output.put_line('Param name = '||l_pair(1));
   dbms_output.put_line('Param value = '||l_pair(2));
 end loop;
end;

Result:

Param name = STATUT
Param value = G
Param name = SUPPRIM
Param value = 0
Param name = PLAN_ID
Param value = 12
Param name = LIBELLE
Param value = SOFTECH
Param name = COUT_PREVISIONNEL
Param value = 3000000
Param name = DATE_CREATION
Param value = 16/11/2010

Tags: Database

Similar Questions

  • Audition Audio 'Split function' does not?

    Have no idea why, but on my old Adobe audition 3.0 version (which works perfectly), when I go to multitrack view and want to change a track - requiring the split function - it does not work.   I pull up the menu and 'split' is one of the options (normal) - then I left click on the position where I want to change the audio track.  (normal)  THEN, when I use the right click and HOLD function on the mouse to "drag" the piece of splitting the audio down in another (normal) track, now it does not work - nothing happens.   Our here does he know why it can happen?  Very frustrated.  Is there a secondary way, I can try to 'split' or separate and 'move' the play published audio... when done, I then MIX again...

    For the record - I CAN cut section and paste it into another track, but I can't MOVE the tracj with my my right click on the mouse.

    make people of sense?  pls advise - Johnny W

    You have the right hybrid tool, selected from among the four tool icons in the menu bar? You don't do a right-click and drag if you have the choice of time or scrub tool selected.

  • Split function does not

    Hi all

    I found this in this forum to split a string into a pl/sql table
    (I need to be a pl/sql table)

    CREATE OR REPLACE PACKAGE pack_test IS
     
        TYPE T_ARRAY IS TABLE OF VARCHAR2(255) index by binary_integer;
     
        FUNCTION get_array_from_string(p_string    IN VARCHAR2,
                                       p_separator IN VARCHAR2) RETURN T_ARRAY;
    END pack_test;
    / 
    CREATE OR REPLACE PACKAGE BODY pack_test IS
     
        FUNCTION get_array_from_string(p_string    IN VARCHAR2,
                                       p_separator IN VARCHAR2) RETURN T_ARRAY IS
            v_string      VARCHAR2(4000);
            v_initial_pos NUMBER(9) := 1;
            v_position    NUMBER(9) := 1;
            v_arr_string  T_ARRAY := T_ARRAY();
        BEGIN
            v_string := p_string || p_separator;
            LOOP
                v_position := INSTR(v_string, p_separator, v_initial_pos, 1);
                EXIT WHEN(NVL(v_position, 0) = 0);
            
                v_arr_string.EXTEND;
                v_arr_string(v_arr_string.COUNT) := SUBSTR(v_string, v_initial_pos, v_position - v_initial_pos);
                v_initial_pos := v_position + 1;
            END LOOP;
        
            RETURN v_arr_string;
        END get_array_from_string;
    END pack_test;
    / 
    has tried this:
    declare
      TYPE T_ARRAY IS TABLE OF VARCHAR2(255) index by binary_integer;
      lv_elements   t_array;
    begin
      lv_elements := pack_test.get_array_from_string('1,2,3,4', ',');
    end;  
    and it gives me:
    ORA-06550: Regel 5, kolom 18:
    PLS-00382: Uitdrukking heeft onjuist type..
    ORA-06550: Regel 5, kolom 3:
    PL/SQL: Statement ignored.
    expression is of the wrong type

    what I am doing wrong



    KR
    Martin

    Hello

    The t_array type defined in the package is not the same as the t_array type defined in your anonymous block. They may have the same name and the same characteristics, but they are both distinct and non-interchangeable.

    Change the call block so that it uses the type declared in the package:

    declare
     TYPE T_ARRAY IS TABLE OF VARCHAR2(255);     -- Not needed, you can delete this line
      lv_elements   pack_test.t_array;          -- This line has been changed
    begin
      lv_elements := pack_test.get_array_from_string('1,2,3,4', ',');
    end;
    
  • FDMEE import Jython Script - field Split function

    Hi people,

    I have to admit, this Jython gives me a heavy headache!

    In fact, it's a simple mistake, but I'm fighting around with it for hours now. Maybe one of you guys can help.

    I want to create a Script of Import in FDMEE 11.1.2.3.500.17. The source file (separator: tab) contains a column with the following entries:

    Capture1.JPG

    What I want to achieve at first is to import the figure after the first point. For example, hours - 00275. 3. 4.1 I want to import 3.

    I wrote a script to import, based on an example of written script in FDMEE admin guide (page 273):

    Capture2.JPG

    I assigned this script to the respective column in the Import Format:

    Capture3.JPG

    Seems easy. But for some reason, it does not. The problem is: even the log file is not help, because it seems to be growing constantly when I want to open it (after becoming 30 MB I cancelled). By the way: without this script works import.

    Any ideas? Help is very appreciated!

    See you soon

    Carmonte

    I wasn't talking about the script file extension, as you say is irrelevant, your file name of the script was eGRCcISPA (without the extension) and your function called eGRCsISPA (in the body of the script). They were different and should be the same. They are the same today? Also when you say that this does not work, what do you mean?

    (1) import runs successfully, but represented for that field values are not what you expect the rest of the script is running?

    (2) the mistakes of import process when using that import format?

  • Program monitor Split function problem of editing window.

    How can I keep my window the program monitor to split into two separate video clips? I don't speak of multi-cam editing what happens when I'm downstairs in the timeline and it kills my productivity because it takes a long time to make a change in a single video frame where I can continue to edit.

    HELP GREATLY APPRECIATED!

    RIP Noel

    Hello

    Is it using specific tools such as the ADJUSTMENT tool?

    Try this:
    Disable "Composite overview for Trim ' under 'timeline view settings.

    Thank you

    Regalo

  • Display! How can I display the function split vertically and not horizontally?

    I would like to split function to view the code on the left and right live view. Right now it shows only the code down and live view on the top. How can I configure it so that I can split vertically view? Please, I really need help with this. Thank you

    1. Make sure that you are in split view (Code from Split or split design/Live view).

    2. To split vertically to view, choose View > split vertically. To split the view horizontally, deselect view > split vertically.

    Working in the Document window

  • I can't find the keyboard Split on iPad Pro feature

    Hello, can you help me to set up the keyboard on my iPad iOS Pro 9.3.1 split function?

    I go to settings/general/keyboard but I can't find the keyboard Split feature

    Thank you very much for your help, ando excuse me for my bad English.

    Alex

    What is the iPad 12.9 inches Pro? If it is then it will not have the option: https://help.apple.com/ipad/9/#/iPad997da62f

    Note: The keyboard split option is not available on iPad Pro (12.9 in).

  • split the signal not showing multiple output

    I'm dividing the multichannel signal from acquisition of data NOR-6008. When I connect the data to the separation of the vi signal, there is that a single output eventhough I did the dow to give me all the outputs.

    Please help its urgent.

    What version of LabVIEW are you using?  You can post your VI?

    If I remember, one of the versions of LabVIEW had a bug in how the signal split function would work.

  • How to split an element in two elements

    I am currently working with a logic analyzer that displays data in a 2D array. The problem is the only way I can receive data is very troublesome for the analysis. I would like to separate the data so that each column corresponds to a certain value, that I am able. So what I really have to split a column into two columns. Basically if I,

    12345678-12345678

    12345678-12345678

    12345678-12345678

    12345678-12345678

    And what I want is:

    1234 5678 1234 5678

    1234 5678 1234 5678

    1234 5678 1234 5678

    1234 5678 1234 5678

    I've been looking for a solution for a long time, any suggestions?

    Charles_CLD wrote:

    If you are dealing with types of integers, you can use the split function on the pallet of data Conversion.

    Woah... what?  That the split function is not going to work.  If you have the value of base 10 12345678, split, it will not produce 1234 and 5678.  Of course, you could argue that the 10 core values are actually base 16 to make the separation, but that will require a conversion of string, and at this time it's easier to cut the string, like this:

  • How to split strings?

    Hello

    I'm using action made by Christophe (http://www.vcoteam.info/learn-vco/code-snippets-cancel-one-of-your-running-workflows.html) in order to cancel some workflows.

    Since the selection for tokens window does not display the parameters of the token, I created another entry for my workflow that is supposed to contain the name of the virtual machine, only for infomational purposes.

    I created an action to do this. When I use just "return myWorkflowToken.getInputParameters ();" then all settings are written to the input box.

    In my case, it looks like this:

    {ram = 3000.0, date = Mon Jan 24 16:25:16 THIS 2011, vm = < @id = FinderResult' VC:VirtualMachine/si0vm271/vm - 852' @name = "si0vm562" >, UC = 3.0}

    Since I need only the name of the virtual machine, in this case the part after @name (si0vm562), I need to retrieve it somehow off the chain.

    In the Orchestrator API, I found the String class with the method 'split '.

    At first, I tried to split the string into two parts using this code:

    var params_s = myWorkflowToken.getInputParameters ();
    var params_a_s = params_s.split ("name");
    return params_a_s [1];

    But when I run the workflow, the input dialogue tells me that the "split" function cannot be found.

    How can I retrieve the VM name on the report of a running workflow?

    Thank you

    Concerning

    Andreas

    Hi Andreas,

    I don't think that splitting strings works for your case.

    In fact workflowToken.getInputParameters () does not return a string. It is ch.dunes.scripting.jsmodel.JSProperties instead (you can check this of the Orchestrator client tools-> API Explorer). The split function is not found on the params_s variable.

    In order to achieve your goal, you can try the following:

    get the vm parameter

    Use the parameter name. This is the vm used according to the result of your message

    VM var = workflowToken.getInputParameters () .get ("vm");

    You can check for safety if the virtual machine is defined, except that the virtual machine is the required parameter

    If (vm! = null) {}

    return vm.name

    }

    The code snippet above you should return the value set for the parameter of the virtual machine.

    Hope this helps,

    Martin Marinov

  • Widget - function replaceVariable() crashes

    Hello

    Anyone who has successfully used the movieHandle.replaceVariables () function provided by the Widget API. I'm trying to use it, but it hangs on a variable findRoot is not defined.

    Please let me know if you have used before.

    Thank you!

    Yves

    Yves,

    I had too many problems to use the replaceVariables() function in myTBEDefaultTextAsVariable widget.  The task was to read an existing user Cp variable and use it as default text with another text entry area.  I gave up on the Widget API and thought it would be easier to write my own funciton.  Nothing fancy... just a standard split function, then using cpGetValue to get the value of the variable.

    if (myString.indexOf("$$") != -1)  {
         ary = myString.split("$$");
         varValue = mainmov.cpGetValue(ary[1]);
    
         // suffix or append any text the user might have put in the Second TEB field besides the variable
         if (ary[0].toString().length != 0 && ary[2].toString().length == 0) {
              varValue = ary[0].toString() + varValue;
         }
         else if (ary[0].toString().length != 0 && ary[2].toString().length != 0) {
              varValue = ary[0].toString() + varValue + ary[2].toString();
         }
         else if (ary[0].toString().length == 0 && ary[2].toString().length != 0) {
              varValue += ary[2].toString();
         }
    
         // Set the text of the TBE field
         curSlide.getChildByName(itemName).EditField_txt.text = varValue; //movieHandle.replaceVariables();
    
         //set variable attached to TBE field
         mainmov[ItemXML.m_associatedVariableName.toString()] = varValue;
    
    }
    

    HTH,

    Jim Leichliter

  • JavaScript string functions

    Implementation of javascript Photoshop supports the string as split() functions?  I was trying to blow up the file name of the document by the _ character (name of my file contain many of these).  If I can't use split... is there another way to do it?

    Yes split is supported...

    var str = "This_is_a_test";
    Str = Str.Split ('_');
    alert (str [3] + "" + str [0] .toLowerCase () + "" + str [1]);

  • Hide/show elements based on the result of the existing function

    Hello

    I have a function that returns two values that are drawn from a process of application On Demand (thanks Shijesh!):
    function myAjaxCall()
    {
       var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=getStatus',0);
       ajaxRequest.add('P11_PATIENT_ID' , $v('P11_PATIENT_ID'))
       //notice the below line.. use of split function
        ajaxResult = ajaxRequest.get().split(',')
       $s( 'P11_CCSS_STATUS' , ajaxResult[0]);
          $s( 'P11_COPAY' , ajaxResult[1]);
    }
    I'm trying to hide/show the other two items (P11_COPAY_COLLECTED, P11_NO_COPAY_REASON) based on the return value for P11_COPAY.

    Is it possible to add an IF statement for the function to show the two elements only if the value is equal to 'Yes'?

    I tried this, but then the two values (P11_CCSS_STATUS, P11_COPAY) are not returned, much less any hide/show:
    function myAjaxCall()
    {
       var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=getStatus',0);
       ajaxRequest.add('P11_PATIENT_ID' , $v('P11_PATIENT_ID'))
       //notice the below line.. use of split function
        ajaxResult = ajaxRequest.get().split(',')
       $s( 'P11_CCSS_STATUS' , ajaxResult[0]);
          $s( 'P11_COPAY' , ajaxResult[1]);
    
    if ( $v ('P11_COPAY' == 'Yes' ) { 
         $x_ShowItemRow('P11_COPAY_COLLECTED');
         $x_ShowItemRow('P11_NO_COPAY_REASON');
    }
    else 
    {
      // Show Items 
    $x_HideItemRow( 'P11_COPAY_COLLECTED');
    $x_HideItemRow( 'P11_NO_COPAY_REASON'); 
    }
    }
    Any suggestion on how / if possible?

    Thank you
    Matt
    if ( $v 'P11_COPAY' == 'Yes' )
    should be
    if ( $v ('P11_COPAY') == 'Yes' ) 
    

    CITY

  • I get an incorrect value for the MIN function?

    Hello

    I get an incorrect value when I run the query below. Here, I'm getting the minimum of the two values. I use the function table of pipeline. This split function the comma separates into single value string. Actuatlly of the sub query min value is 956.23. But he's back 1002.56 as min value. How is it possible?

    Other wise, is there another way to get the min of comma-separated string value?
    SELECT  MIN(COLUMN_VALUE)
    FROM    TABLE(get_string_comma('956.23,1002.56',','));

    Hello

    I understand your situation, try:

    SELECT  MIN(to_number(COLUMN_VALUE))
    FROM    TABLE(get_string_comma('956.23,1002.56',','));
    

    Kind regards

  • Splitting data sets

    Hello
    I have a function that returns data in pipeline. So when my query statement, I say fnk() selection of double, it returns a dataset that includes columns I've selected.
    I need to have the columns and separate data. How can I do this? I guess I need something like split function.
    Thx for the answers

    You must process the pipeline in a table for example function

    select *
    from table(fnk());
    

Maybe you are looking for

  • Tecra M2 - green screen of vertical lines, help needed!

    Hi all, looking for some advice with an old Tecra M2, I get this: Any ideas on the flaw before I get out the screwdriver? [http://s91.photobucket.com/albums/k311/Jay_Carrots/?action=view&current=DSC00446.jpg] Thanks in advance, Justin

  • HP 13 Stream: Flow graph card 13 Hp and performance

    Hey everybody, I intend to buy a laptop computer cheap. I wanted to ask you what graphics card Intel hd this PC has? There are 11 variations of them. And I also wanted to ask you it can run games that rely on the source as half life2 engine?

  • Can I remote help Windows 7 to Windows XP computer?

    Original title: offer remote assistance You are able to offer assiatance remotely from a windows xp on a windows machine 7 on the same field, I know that's not possible between XP and Vista, but it is possible to XP to 7

  • Sound system disabled

    Realtek disabled want to return to microsoft sound system do not know how?

  • screen touch iq772uk

    I want to reinstall the system, but when I press F11key the continuous pc just to start Windows, I tried different times to press but I guess that you press on when you are prompted. also how do I replace the keyboard that came with the pc. You can s