reclassification how to convert string into array

Hi all


I do the code

CREATE OR REPLACE
TYPE 'SAMPLE '. "" SAMPLETABLETYPEVAR ".

PLS-00311:

but I got to l_data error how can I solve

/***************************************************************/
declare
l_str DEFAULT LONG ' pankaj/dukare /';
l_n NUMBER;
SAMPLETABLETYPEVAR l_data: = SAMPLETABLETYPEVAR ();

BEGIN

LOOP
l_n: = INSTR (l_str, "/");
WHEN the OUTPUT (NVL (l_n, 0) = 0);
l_data. EXTEND;
l_data (l_data. (COUNTY): = LTRIM (RTRIM (SUBSTR (l_str, 1, l_n - 1)));
l_str: = SUBSTR (l_str, l_n + 1);
END LOOP;

L_data RETURN;

END;

/********************************************************/

Published by: user9524857 on July 1st, 2009 23:36

using your code:

SQL> select *
  2    from table (sample_split_string ('this is a long string', ' ')
  3  /

COLUMN_VALUE
---------------------------------------------------------------------
this
is
a
long
string

Tags: Database

Similar Questions

  • convert string into array of char

    What is the best way to convert a string to an array of characters?

    Thank you.

    String to byte array

  • How to convert string to number in TS?

    Hello

    Anyone know how to convert string to number in TS?

    I couldn't find the Num() function.

    Thank you

    Val()

  • I have video saved in my phone as .3GPP and unable to pay in my PC. How to convert it into a common format so that I can share it with my friends

    I veod .3gpp format how to convert it into an appropriate format

    Hi Das,

    Thank you for using Microsoft answers Forums!

    Can I play this type of file in Windows Media Player?

    The .3GPP is a type of media file that is not supported by the player, unless you acquire additional software:

    3GPP multimedia. Ringtone/video files with .3gp file name extensions are usually present on Windows Mobile devices. You can download DirectShow on Internet filters that allow you to play the ringtone file in the drive. Remember, however, that some filters can introduce instability with your computer or programs in general. Ensure that the filters are a reliable supplier of software before downloading.

    You can use your favorite search engine and download DirectShow filters for your computer. You can also search the internet for some third-party software using your favorite search engine to convert the GP 3 or 3 GP player file to a wmp file and install it.

    NOTE: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information was useful.
    Let me know if it worked.
    All the best!

    Thank you and best regards,
    R uma - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to convert string input streams

    Can someone tell me how to convert string input streams...

    There are multiple ways. I will list down few of them.

    With the help of the old solution and standard java.

    publicstaticString fromStream(InputStream in)throwsIOException

    {

       BufferedReader reader =newBufferedReader(newInputStreamReader(in));

       StringBuilder out =newStringBuilder();

       String line;

       while((line = reader.readLine()) !=null) {

           out.append(line);

       }

       returnout.toString();

    }

    returnsb.toString();

    If you use Google-Collections/guava-

    InputStream stream = ...

    String content = CharStreams.toString(newInputStreamReader(stream, Charsets.UTF_8));

    Closeables.closeQuietly(stream);

    If you use the common Apache library... then it is worthwhile.

    StringWriter writer =newStringWriter();

    IOUtils.copy(inputStream, writer, encoding);

    String theString = writer.toString();

    Quick way but only work during deserialization.

    String result = (String)newObjectInputStream( inputStream ).readObject();

    Note: ObjectInputStream is on deserialization and the flow of data must respect the Protocol of serialization to work, which may not always true in all cases.

    Ultimately, the most effective solution and only in two lines using java class Scanner.

    Tricky is to remember the \A regex that matches the beginning of the entry. It actually indicates Scanner to mark all of the flow, from start to beginning next (illogical).

    publicstaticString convertToString(InputStream in) {

       java.util.Scanner s =newjava.util.Scanner(in).useDelimiter("\\A"); 

           

       returns.hasNext() ? s.next() :"";

    }

    Read more: http://www.techartifact.com/blogs/2013/11/how-to-readconvert-an-inputstream-to-a-string.html#ixzz2lvy5muix

  • explode a string into array elements

    Is this a way to explode a string into elements of array in oracle?
    as ' has. B | C | D | E' in
    5 separate strings?

    If so, how do I?
    Please guide me with some examples.

    Thank you

    Here is a way by using the loop.

    SQL> SET SERVEROUTPUT ON;
    SQL>
    SQL> DECLARE
      2    vValue VARCHAR2(10):='ABCDEFGHI';
      3  BEGIN
      4    FOR A IN 1..LENGTH(vValue) LOOP
      5      DBMS_OUTPUT.PUT_LINE(SUBSTR(vValue,A,1));
      6    END LOOP;
      7  END;
      8  /
    A
    B
    C
    D
    E
    F
    G
    H
    I
    
    PL/SQL procedure successfully completed.
    

    Here's another way to query too ;)

    SELECT SUBSTR('ABCDEFGHI',LEVEL,1) VALUE
    FROM DUAL
    CONNECT BY LEVEL <= LENGTH('ABCDEFGHI');
    

    -Clément

    Published by: Hannah on May 8, 2010 10:01
    Query added.

  • OpenScript/Bank of data/how to convert string to int

    Hello

    As far as I know, the values read from the database is a type of Sting. Now, I want to convert a character number stored in the database of type int.
    For example, in "Test.csv" I stored the '9' in the column 'Number' character, then I use the following code to read the character and convert an int in one:
    getDatabank("Test").getNextDatabankRecord ();
    String Testnumber = "{{db." Test.Numberr}} '; Info (Testnumber);
    int number = Integer.parseInt (Testnumber);

    However, it seems this does not work, because he says "basic unexpected failure caused by: NumberFormatException occurred." For the input string: «{{db.» Test.Numberr}}.
    I think that this error can be caused by the conversion of character '9' int 9.
    Can someone tell me how to convert a character to be read from database in an int?

    Thank you very much!

    Kind regards
    Angyoung

    Hello

    You can use the same approach. Use eval()

    getDatabank("Test").getNextDatabankRecord();
    String Testnumber =eval("{{db.Test.Numberr}}") ;
    info(Testnumber);
    int number = Integer.parseInt(Testnumber);
    

    Kind regards
    Dembélé M

  • How to convert jpg into pdf file file

    Hello friends at this new and need to know the best way to convert a jpg into pdf file? Thank you Delilah Ramirez

    1. go to the menu 'File' in Adobe Acrobat / Reader.  Select "Create a PDF file" and then select "file".

    2. Locate the JPEG you want to convert by using the menu "Open" is displayed on the screen.  Highlight the file, and then click on 'open '.

    3. Save as a JPEG to PDF by going to the "File" menu and then selecting "Save".  Use the menu to assign a name and save location for the PDF file.  Click on the button "Save" to complete the process.

    You can also check: http://blogs.adobe.com/tcs/2011/02/how-to/convert-files-to-pdf-using-adobe-reader-x.html

    Kind regards

    Ravi.

  • How to convert String to Date

    hell there everyone,

    I have a question which is:

    How to convert a string that we get by reading an XML in the instance of date value type?

    So there is a XML that modifiedDate as an attribute on a node of the XML and how I put this value in an instance variable date?

    the timeformat in the XML file is: mm/dd/yyyy hh: mm: = > 31/12/2010 23:57:46

    I chose this time format because I want to use the method . parse() which always causes an error, but that's another topic...,.

    hope I was clear on the issue,

    Thanks in advance for the help.

    First of all, you should watch the Date object constructor to find out how to specify different parameters.

    public void Date (yearOrTimevalue:Object, month:number, date:number = 1, hour:number = 0, minute:number = 0, second:number = 0, millisecond:number = 0)

    Then you need to determne how to break the string by using the String.Split method.  The first split() should be the space between the date and time, the second for the slashes in the date and the third for the colon in time.

    Then you come to take each of these paintings of substrings and feed them in the constructor as the Number() values.

    If you remain unsure how to do this, look at the different terms that I have identified in the help documents and you will find them all explained with examples.

  • How to convert PDF into word document

    How to convert PDF to Word doc?

    Hello

    You can see the following link to convert a PDF file to word using Acrobat.

    https://helpx.Adobe.com/Acrobat/using/exporting-PDFs-file-formats.html

    Concerning

    Sukrit diallo

  • Convert the text string into array of words

    I'm trying to convert an input string of sentence written with spaces between words in an array of strings of 1 d with one word in each element of the array.

    That's what I have so far, but his does not work as I would like.   I have trouble getting in the array to zero at the beginning of each series.

    Thank you

    Why don't you just use the String Array to worksheet and specify a space as a separator?

  • How to convert string data from the serial port to double?

    Hello!

    I am very new in LabView and attempt to read data from an OHAUS pioneer pa-313 electronic scale via RS232 serial port. I use the VISA. I can read the data and see it as a string to the screen, but when I try to convert it to a double, it is just the integer and decimal numbers have disappeared. Here's the question: what can be the problem? How can I get the decimals as well?

    What is your normal decimal point?. or?

  • How to convert string to datetime in the transformation of the Ombudsman

    Hello

    I am getting error below when inserting the data in the database using the database.

    Exception occurred when the link was invoked. Exception occurred during invocation of the JCA binding: "JCA binding run reference"insert"operations have to: DBWriteInteractionSpec Execute Failed Exception." insertion failed. The descriptor name: [InsertPayload.XxohInsertStgTable]. Created by Exception [EclipseLink-3001] (Eclipse - 2.3.1.v20111018 persistence Services - r10243): org.eclipse.persistence.exceptions.ConversionException Description of the Exception: object [2015-09-14 15:19:51], class [class java.lang.String], couldn't be converted [class java.sql.Timestamp]. Inner exception: LINK. JCA-11636 couldn't convert Timestamp Exception. Cannot convert a string value in the xml file to a java.sql.Timestamp. Although the databases accept strings representing the timestamps in a variety of formats, the adapter only accepts strings that represent xml ISO dateTime format. The input value must be in the format XS: DateTime to iso 8601, i.e. YYYY-MM - DDTHH:MM:SS.sss - 07:00. Please see the logs

    In the transformation of the mediator, the Source element is a string

    < xs: element name = "CREATED_DATE" type = "xs: String" > < / xs: element >

    Target is of type dateTime

    < xs: element name = "Creation_Date" type = "xs: DateTime" minOccurs = "0" nillable = "true" / >

    To avoid the above error, I used < xsl: value-of select ='xp20:format - dateTime (/CREATED_DATE, "[Y0001]-[M01]-[D01] [H01]: [m01]: [s01]")'/ > in the transformation, but its does not work. The value is blank display after processing.

    Please suggest me how to solve this problem.

    Thank you

    Sunita

    Unfortunately, the format required by the dateTime format is YYYY-MM - DDTHH:MM:SS.sss

    You can use the substring, and on the entry's concat function to create YYYY-MM - DDTHH:MM:SS.sss

    See formatting string to date in BPEL

  • How to convert string to [AVLayer]

    Hello world.

    I have this code:

    var myComp = "app.project.activeItem";
    var text = '.layer("4").effect("Unsharp Mask")("Amount")';
    var myLayer = myComp+text;
    
    alert(myLayer.value)               // doesn`t work
    

    How can I convert to string (myLayer) [AVLayer] object to get its property?

    This should help you closer:

    myComp = "app.project.activeItem"; var

    var myText = ".layer("4").effect (" unsharp mask ")("Amount").value";

    var myVal = eval (myComp + myText);

    Alert (myVal);

    Dan

  • How to convert an ObjectProxy Array\ArrayCollection?

    Hello...

    I have an ObjectProxy that I get from main system in flex, which has this structure under ResultEvent:

    ObjectProxy.JPG

    The objectproxy will be dynamic ie., I have 6 values of field now. Based on the inputs provided when retrieving data from the back-end system, this can vary. Next time, it could have more than 2 or 3 fields as well as those already existing.

    I want to display it as a pie chart. To do this, I would need a table in this form:

    ArrayCollection.JPG

    Can you please help me on how to create a dynamic of this form above, table using the ObjectProxy? If not, is it possible, can I use the ObjectProxy data to display the pie chart, which is what my goal it?

    Appreciate your kind help

    <! -Deepak - >

    Var arr:Array = [];

    For (var p:String in objectproxy)

    {

    arr.push ({label: p value: objectproxy [p]})

    }

    AC = new ArrayCollection (arr);

Maybe you are looking for