Problem in Query -How to de-concatenate the field.

Table Structure
Opt_code varchar2(10),
Option varchar2(50),
Menu varchar2(5)
Text varchar2(200));Example Data
A001     
Create Credit Memo      (CREDIT PROCESSING)     
ADM     
|AZH|RAZ|MUN|ZAF|TMP|AD1|MRM|MKA|GQK|KHA|SHA|SHK|AAK|ALI|SHH|MTB|MTL|SAS|SAH|MFF|SAA|KAA|FAA|SHS|TRS|WMK|SRA|SAK|MSA|AHL|SMT|SMS|MKM|YUK|ABD|SOH|SAD|FAR|ABI|SAF|MUR|KHY|ATF|FZL|My requirnent is data to reterive in this fornat
EXAMPLE
A001  Create Credit Memo      (CREDIT PROCESSING) ADM AZH
A001  Create Credit Memo      (CREDIT PROCESSING) ADM RAZand so on.
here u can see Opt_code is repeating as per every thing between | | in the FIELD TEXT
waiting for reply
Edited by: danish_rizvi on Aug 5, 2009 1:01 PM

Okay. This is your 8i query. I strongly suggest you to migrate to higher version, not to anything before 10g.
SQL> with t as
  2  (select 'A001' col1,
  3          'Create Credit Memo      (CREDIT PROCESSING)' col2,
  4          'ADM' col3,
  5          'AZH|RAZ|MUN|ZAF|TMP|AD1|MRM|MKA|GQK|KHA|SHA|SHK|AAK|ALI|SHH|MTB|MTL|SAS|SAH|MFF|SAA|KAA|FAA|SHS|TRS|WMK|SRA|SAK|MSA|AHL|SMT|SMS|MKM|YUK|ABD|SOH|SAD|FAR|ABI|SAF|MUR|KHY|ATF|FZL' col4 from dual)
  6  select col1,
  7         col2,
  8         col3,
  9         substr(col4,
10                decode(a.rn, 1, 1, instr(col4, '|', 1, a.rn-1)+1),
11                decode(a.rn, 1, instr(col4, '|', 1, a.rn)-1,
12                             length(col4) - length(replace(col4, '|'))+1, length(col4) - instr(col4, '|', 1, a.rn),
13                             instr(col4, '|', 1, a.rn) - instr(col4, '|', 1, a.rn-1) -1
14                       )
15                ) val
16  from (select rownum rn
17        from user_objects
18        ) a,
19        t
20  where a.rn <= length(t.col4) - length(replace(t.col4, '|'))+ 1
21  /
COL1 COL2                                        COL VAL
A001 Create Credit Memo      (CREDIT PROCESSING) ADM AZH
A001 Create Credit Memo      (CREDIT PROCESSING) ADM RAZ
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MUN
A001 Create Credit Memo      (CREDIT PROCESSING) ADM ZAF
A001 Create Credit Memo      (CREDIT PROCESSING) ADM TMP
A001 Create Credit Memo      (CREDIT PROCESSING) ADM AD1
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MRM
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MKA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM GQK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM KHA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SHA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SHK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM AAK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM ALI
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SHH
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MTB
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MTL
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAS
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAH
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MFF
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM KAA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM FAA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SHS
A001 Create Credit Memo      (CREDIT PROCESSING) ADM TRS
A001 Create Credit Memo      (CREDIT PROCESSING) ADM WMK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SRA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MSA
A001 Create Credit Memo      (CREDIT PROCESSING) ADM AHL
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SMT
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SMS
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MKM
A001 Create Credit Memo      (CREDIT PROCESSING) ADM YUK
A001 Create Credit Memo      (CREDIT PROCESSING) ADM ABD
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SOH
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAD
A001 Create Credit Memo      (CREDIT PROCESSING) ADM FAR
A001 Create Credit Memo      (CREDIT PROCESSING) ADM ABI
A001 Create Credit Memo      (CREDIT PROCESSING) ADM SAF
A001 Create Credit Memo      (CREDIT PROCESSING) ADM MUR
A001 Create Credit Memo      (CREDIT PROCESSING) ADM KHY
A001 Create Credit Memo      (CREDIT PROCESSING) ADM ATF
A001 Create Credit Memo      (CREDIT PROCESSING) ADM FZL
44 rows selected.
SQL>Cheers
Sarma.

Similar Messages

  • How can I keep the field in the same page

    How can I keep the field in master frame in the same page of the detail frame?
    They are in the different pages sometimes?
    Thank you.

    I believe the OP has a question similar to mine...
    I have several groups, and the master for each group is only one line, and the detail is between 1 and five lines, like so:
    A
    A1
    A2
    B
    B1
    C
    C1
    C2
    C3
    ...The problem is, sometimes only the master record gets printed at the bottom of the page, and then the detail is printed at the top of the next page. I don't need each group on it's own page. I just want to be sure that if the detail can't fit on the page with the master, then I want the master to only print on the next page.
    Can you help with this?

  • Pages 5.2 How do I remove the fields in the header and footer?

    I need to add objects and footers that are longer than the field dividers allow in the header and footer of my document. How do I remove the field divisions?

    You can't remove the dividers in Pages 5.
    They don't exist in Pages '09.
    On the Mac you can simply keep typing and the text crosses the dividers.
    A quick test on my iPod touch suggests the same on iOS.
    Peter

  • How to programmatically place the field in the canvas.

    Hello!
    Can you please tell, how to programmatically place the field BLOCK1.FIELD1 in the canvas CANVAS1.
    At the moment on the field value CANVAS = NULL.
    And when opening the form error "FRM-41014 Cannot set attribute of null canvas item..."
    Thank you

    Youcannot assign a canvas at runtime. Yu have to specify int at designtime and it cannot be changed at runtime. if you need an item in more than one canvas, use a mirror-item (duplcate the item and set the property Synchronize with)

  • How do you change the fields that are displayed on the email preview list after a search?

    How do you modify the fields that are displayed in the mail preview list in the center column of Mac mail after you conduct a search of your email?   All of a sudden the displayed fields changed on me whenever I do a search in mail.   When I have not filtered my email with a search, the default field shown in bold at the top of each message's preview is the "From" field.   However, when I do a search this changes to the "To" field.   Can anyone help?   Thanks, ccarey

    ipicus
    But why would you want this?
    iTunes is responsible for the File Management, let it get on with it, you do your organisation in the iTunes window. And everything you need to do, you can do via the iTunes Window. Want to find the file of a track quickly? Right click on it in the iTunes Window and select Show File: A finder window pops open with the file already selected.
    Regards
    TD

  • How can I set the field ICt in component table of the Tasklist as "Input" ?

    Hi experts,
    How can I set the field ICt (BOM's Item Category (POSTP)) in component table of the Tasklist as "Input" Status (The system is in gray now).
    I can define the different Category value by IB01 or IB02,then I can select them at the Tasklist's component table.But sometimes I need batch input such as LSMW,so pls kindly tell me how to setup it,thanks!
    Yinjun

    Hi,
    BOM is created with some component and item category.
    In task list when you go to component, in normal case one selects and copies BOM over there by clicking component selection button.
    Once BOM is copied over there the BOM item category will get copied. As it is BOM item category in Task list it is greyed and it will get copied automatically from BOM.
    You specify item category required by you in IB01 or IB02 and then use that BOM in task list. Go to componenet tab and click component selection button. Once BOM is copied over there the BOM item category will get copied

  • How to add get the field name for a newly added site column.

    I have the following:-
    Enterprise wiki site collection inside SharePoint server 2013.
    I added a new site column of type managed metadata.
    I opened the enterprisewiki.aspx page layout using the SP designer, to add the newly added site column to it.
    But I have noted that to add any site column I need to know the field name , for example the default wiki category column is referenced inside the page layout as follow:-
    <Taxonomy:TaxonomyFieldControl FieldName="Wiki_x0020_Page_x0020_Categories" EmptyValueDescriptionForTargetTemplate="<%$Resources:cms,enterwiki_nocategories_assigned%>" DisableInputFieldLabel="true" runat="server"/>
    <b>
    So my question is how I can know the field name for my newly added site column?
    Thanks in advance for any help.
    Regards

    Hi,
    The “FieldName” should be the internal name of the column, you will find it at the address bar at the “Site Columns”->”Edit Column” page:
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • To create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    to create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    You need to be in a country to use its store - if you are not in the US with a US billing address then you cannot use the US store.
    From the US store's terms of use :
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

  • How can i find the fields for &DOPOS_CPY-WRBT1(I13.0)&

    Hi All,
    In sapscripts, what is the meaning for (13.0)?
    how can i find the fields for &DOPOS_CPY-WRBT1(I13.0)&?
    Thanks.

    meaning for (13.0) is write to form this variable's 13 character non decimal and 0 character decimal places.
    shortly not write decimal places.
    DOPOS_CPY-WRBT1 is exist in form caller program. check in abap program not in sapscript.
    take care
    Çağatay

  • How to auto populating the field in MS crm

    How to auto populating the field in MS crm

    Hi,
    To populate URL of account based on account name please refer this link.
    If you are asking about the address auto populate/complete refer this link
    To Retrieve from other entity and populate the fields, for example on entering the account name in opportunity form the fields from account form like Sector, Region can be retrieved and can be auto populated in opportunity form using Odata as follows.
    Call the function getAccountDetails in onchange event of Companyname. Do not forget to add Jquery and Json in libraries.
    function getAccountDetails() {
        var companyName = Xrm.Page.getAttribute("customerid").getValue();
        if ((companyName != null)) {
            var companyNameValue = companyName[0].name;
            var companyNameID = companyName[0].id;
            var serverUrl = Xrm.Page.context.getServerUrl();
            //The XRM OData end-point
            var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
            var odataSetName = "AccountSet";
            var odataSelect = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "(guid'" + companyNameID + "')";
            //alert(odataSelect);
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                datatype: "json",
                url: odataSelect,
                beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
                success: function (data, textStatus, XmlHttpRequest) {
                    var result_account = data.d;
                    var name;
                    var Id;
                    var entityType;
                    //replace the fields with the fields on your entity
                    Xrm.Page.getAttribute("new_sector").setValue(result_account.new_Sector.Value);
                    Xrm.Page.getAttribute("new_region").setValue(result_account.new_Region.Value);                     
                error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + odataSelect); }
    Also as another option if you donot wat the java script then you can go for a workflow to poplate, please refer this link:  https://www.powerobjects.com/blog/2013/11/25/retrieving-data-from-a-related-entity-crm-2013/
    Regards, Rekha.J

  • How can I use the field "Sales Order" on derivation?

    Dear All.
    This is about PA characteristic derivation.
    I want to change the characteristic value "Sales Order (KAUFN)" by derivation.
    But I cannot select the characteristic field on target field.
    The field "Sales order(KAUFN)" doesn't exist there.
    Why? How can I use the field "Sales Order" on derivation?
    Y.C.Bae

    Hi Bae,
    in order to be able to choose fields KAUFN (for sales order) and KDPOS
    (for sales order item) as target fields of derivation step 'enhancement'
    you have to modify the coding of subroutine EXIT  GET_ALLOWED_TARGETS
    in program RKEDRCOPA like this:
        NAME-IDENTIFIER = 'CO-PA'.
        NAME-TABNAME = FIELDTAB_ENTRY-TABNAME.
        NAME-FIELDNAME = FIELDTAB_ENTRY-FIELDNAME.
        IF FIELDTAB_ENTRY-USGFL CA 'DUV'
    BEGIN OF INSERTION *****
             OR FIELDTAB_ENTRY-FIELDNAME = 'KAUFN'
             OR FIELDTAB_ENTRY-FIELDNAME = 'KDPOS'
    END   OF INSERTION *****
             OR FIELDTAB_ENTRY-FIELDNAME = 'KNDNR'
             OR FIELDTAB_ENTRY-FIELDNAME = 'ARTNR'
    Actually sales order number and sales order item shouldn't be changed
    by derivation (therefore they are no valid target fields in standard)
    but if you need to fill them within an enhancement this modification
    will help you to define them as valid target fields. But this is just
    the technical frame so far; the logic from which table you'd like to
    derive the sales order number correctly depends on your implementation
    of the enhancement! I just want to ask you to be rather careful with
    the implementation of the exit so that the sales order number isn't
    changed in cases that shouldn't be concerned.
    Regards,
    Abhisek

  • How can i validate  the field directline under personal information of ESS?

    Hi all,
    How can i validate the field directline under personal information--> communication data  of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
    Thanks and Regards,
    sam

    Hi,
    This is probably a wrong forum that you have posted your question to.
    Regards,
    Siddhesh

  • SAP Query - How can I add the description

    Hi,
    I need to add in my ueries descriptions for different filed: Ex. Condition Type (I only have the BO01, I need to display "Mat/Group Rebate"), Status of the agreement (in stead of C,B, D etc, I need Settlement parrtyaly done.. etc) , Reason for rejection, and so on..
    Any idea what is the table where I can find this descripions?
    Thank you all!,
    Kind regards,
    Cris

    Hi,
    Can you tell me all the fields you need to put description for (if possible). It seems you have diffrent status and indicators in your output. if yes, all will be coming from diffrent tables and hence description also lying in diffrent tables.
    rgds

  • How can i post the fields in the screen by selecting a record

    Hi,
      I have a problem in dialog programming.
      I need to populate the fields in the screen by selecting a single record.
      For example,
        Screen consists of 'CARRID, CONNID,FLDATE... fields.
        By pressing F4 in CARRID field it will display the contents from database table and display the records. If i select the record LH 0400 ... record then automatically the connid field should fill with the contents of the record i.e., 0400 and similarly the remaining fields.
       How can i do this in dialog programming?
       I tried with F4IF_INT_table_.. function module. There is a table parameter DYNmapping. But dont know how to use it? Can any body explain me how to use it?
       Thanks in advance..
       Suvan

    Hi Vinod,
      Thanks for your reply. I solved my problem. It is working with the table parameter 'DYNPFLD_MAPPING' in the function module 'F4IF_INT_TABLE_VALUE_REQUEST'.
      With your logic we can't decide which record is selected. Because there can be multiple records for a single CARRID.
      My question is how to post the entire record into the screen fields at a time? It is possible with the parameter I specified inthe above said function module.
      With dictionary reference it will fetch the entire entries from the Check table.
      Thanks again for your co-operation.
      Suvan.<b></b>

  • How to split all the fields of output ls-l from an internal table

    Hi all,
    Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
    Now how to split all these fields from the internal table or what should be the splitting criteria.
    The field contents of internal table are like this:
    -rw-rw----    1  devadm     sapsys     18360    apr  29......so on
    I want to split this into different fields.
    Kindly suggest.
    Thank You.

    Hi,
    I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
    Thanks and regards,
    S. Chandramouli

Maybe you are looking for

  • Same apple id can locate iphone but not ipod touch

    I have find my iphone installed on both devices, location services are on, wifi is on, icloud is on and find my iphone is on within icloud in settings, but I cannot locate the ipod touch only the iphone. Any ideas??

  • Can't start compiz

    I have compiz set to start in my .xinitrc When I start it I have a mouse cursor I can move around, and that's it. I can't find any way to start programs or do anything.... I get that I have done something wrong....but what? I can't find any documenta

  • Import weirdness and import dialog box

    I'm in the import box and I want to import just the RAW (DNG) files from a folder and not the accompanying JPEGs. First strange thing I notice is that Aperture is telling me that the JPEG files are roughly the same size as the RAw files. I thought I

  • Any way to NOT import JPEGs with RAWs?

    When I import RAW files from my camera, Aperture imports the JPEG images as well but keeps it hidden from view. I dug into the Aperture Vault to check out what was going on, and it stores the 4-5 MB JPEG alongisde each RAW file. I can't see the reaso

  • Table Comparison to pull back non matching data

    Hello, I have been working on the below for a few days now and cannot figure out how to get the desired results. Was hoping someone could point me in the right direction. I have attached the data below and the queries I have come up with so far. I on