How to get the array with in the array in plsql?

Hi,
I have a table contains the data like below strcture.
LINE_NUMBER     TAG_NUMBER     NOTES     TORQUE_1     TORQUE_2     TORQUE_3
1          SSS          SUCCESS     2000          3000          4000
1          SSS          SUCCESS     4000          5000          6000
1          SSS          SUCCESS     7000          4000          8000
2          YYY          FAIL     200          300          400
2          YYY          FAIL     400          500          600
2          YYY          FAIL     700          400          800From the above table data line_number, tag_number and notes are the commom values for the particular line number. If you see the line number 1, we have three records torque values with different torque values for one line number. Now i have to create a stored procedure to store the line_number, tag_number and notes in one array then remaining torque column for another array. The output should be the below. The output will be for line number 1 is for array1 and remaining torque values for that lin number is another array2. The same line number 2 is will come in array1 and torque information of line number 2 is for another array2. This will be structure.
Array_1 Count :2
Array_2 Count :6
1: LINE_NUMBER: 1: TAG_NUMBER: SSS, NOTES: SUCCESS
1: TORQUE_1:2000, TORQUE_2:3000, TORQUE_3:4000
2: TORQUE_1:4000, TORQUE_2:5000, TORQUE_3:6000
3: TORQUE_1:7000, TORQUE_2:4000, TORQUE_3:8000
2: LINE_NUMBER: 2: TAG_NUMBER: YYY, CUST_NUMBER: FAIL
1: TORQUE_1:200, TORQUE_2:300, TORQUE_3:400
2: TORQUE_1:400, TORQUE_2:500, TORQUE_3:600
3: TORQUE_1:700, TORQUE_2:400, TORQUE_3:800Can anyone share with your thoughts?
Thanks
Edited by: orasuriya on Jul 10, 2009 10:33 AM

Not sure why you need pl/sql
WITH YOUR_TABLE AS
SELECT 1 LINE_NUMBER, 'SSS' TAG_NUMBER, 'SUCCESS' NOTES, 2000 TORQUE_1, 3000 TORQUE_2, 4000 TORQUE_3 FROM DUAL
UNION ALL
SELECT 1,'SSS','SUCCESS',4000,5000,6000 FROM DUAL
UNION ALL
SELECT 1,'SSS','SUCCESS',7000,4000,8000 FROM DUAL
UNION ALL
SELECT 2,'YYY','FAIL',200,300,400 FROM DUAL
UNION ALL
SELECT 2,'YYY','FAIL',400,500,600 FROM DUAL
UNION ALL
SELECT 2,'YYY','FAIL',700,4000,800 FROM DUAL
SELECT     DECODE (rn, 0, line_number, rn) || ':',
           col_val3,
           col_val2,
           col_val3
FROM       (SELECT   0 rn,
                     line_number,
                     tag_number,
                     notes,
                     'LINE_NUMBER:' || line_number col_val1,
                     'TAG_NUMBER:' || tag_number col_val2,
                     'NOTES:' || notes col_val3
            FROM     your_table
            UNION
            SELECT   ROW_NUMBER ()
                       OVER (PARTITION BY line_number, tag_number, notes
                             ORDER BY ROWNUM
                     line_number,
                     tag_number,
                     notes,
                     'TORQUE_1:' || torque_1,
                     'TORQUE_2:' || torque_2,
                     'TORQUE_3:' || torque_3
            FROM     your_table)
ORDER BY   line_number, tag_number, notes, rn

Similar Messages

  • On iTunes when i plug my iphone in, the bar at the bottom with contains the information about the capacity of my iphone, it has a bar called 'other' which has 4GB. I don't know what is taking up that space or how to get rid of it. please help :)

    On iTunes when i plug my iphone in, the bar at the bottom with contains the information about the capacity of my iphone, it has a bar called 'other' which has 4GB. I don't know what is taking up that space or how to get rid of it. please help

    You can reduce the size to normal, which is about 1GB, by restoring the phone.
    Backing Up, updating, and restoring your iPhone and iPod touch software
    The size of this part can increase when something goes wrong during a sync, or some files can't be read anymore by iTunes.

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..

    My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..
    So how do I create a separate I tunes on a PC which already has itunes... Or if not can I plug my iPad to the PC and use itunes on my iPad, and drag mp3s from a computer.
    I'm not sure what the equivalent of a desktop is on the iPad.. And I don't actually know how to use the icloud either...
    Can anyone start me off, given it have a iPad and use of a PC - not mine with existing iplayer
    I do have spotify soundcloud so I could potentially use these.. If there is a route of getting either mp3's etc to end up on my iPad or iPod.
    Kind Regards

    iTunes 11
    If you  have iTunes 11 turn on the Sidebar.  Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod....>Sync You Device and follow the instructions.

  • I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    You can't.
    Change your iTunes (Apple ID) password along with any other password that was stored in the iPod.  If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number).  If any passwords are associated with a bank or any other savings institution, contact them also and discuss approprate action with them.
    The only real protection you have is with the personal information on the device rather than the physical device itself.  This requires action before the device is lost/stolen.  If the device has significant personal information, it should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries.

  • How to get a check box on the selection screen

    Hi all
    can any body tell me how to get a check box on the selection screen

    parameter: pa_check   as checkbox.
    To define the input field of a parameter as a checkbox, you use the following syntax:
    PARAMETERS <p> ...... AS CHECKBOX ......
    Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
    If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
    REPORT DEMO.
    PARAMETERS: A AS CHECKBOX,
    B AS CHECKBOX DEFAULT 'X'.

  • How to get a scroll bar to the applications popup by default?

    How to get a scroll bar to the applications popup by default when clicked the applications folder from the dock? If I have so many applications that they do not fit in the default area, I have to find out myselft that I have to scroll the content before the scroll bar appears. This leads to "where is my missing applications questions" by the novice users with Mountain Lion.

    System Preferences > General > Show scroll bars.
    Click the button by the side of "Always".
    Best.

  • Anyone know how to get a free upgrade on the OSx 10.6

    I've been searching all night, and cant seemtofigure out how to get a free upgrade of the OS X 10.6! Anyone know where or how?

    There is no free upgrade.
    Do you currently have the 10.5.8 Combo update loaded?  (if not download and apply the Mac OS X 10.5.8 Combo Update )
    Then, check that your machine is suitable for Snow Leopard.   It needs to be a Mac computer with an Intel Core 2 Duo processor.   Check by reading the specs.
    Mac OS X v10.6 Snow Leopard -Read the Technical Specifications
    Snow Leopard is a paid upgrade by DVD not a download.  To buy the DVD, if you are from the USA go to … http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard.
    In Europe or otherwise substitute your national code in place of /us above.
    In UK go to Apple Store UK       Mac OS X 10.6 Snow Leopard - Apple Store (UK)
    Before you start upgrading, back up your files.   If you are unsure how best to do this, the following link is hugely informative.        Most commonly used backup methods: Apple Support Communities.
    Once you have upgraded to Snow Leopard, if your upgrade took you to 10.6.3 you will need to download and apply the Combo updater.  Mac OS X 10.6.8 Update Combo v1.1  and follow with software updates to pick up the most recent security and iTunes updates.

  • How to get deleted photos back in the trash can?

    I tried to dele all the photos I've deleted from iPhoto by cmd+delete all the photos in the iPhoto trash can, but that only made all the photos reappear in iPhoto.
    How do I get the deleted photos back in the trash can?
    I discovered this the next time I turned on my mac, so I couldn't just "go back".
    I really don't wanna go trough ALL of my pictures and delete the thousands of pictures I've deleted over the past three years..
    I now know how to delete dem properly, but not how to get them all back in the trash can. Please help me!
    Ida

    There's no way to do that. If you try and trash thousands of photos at one go you'll trash the Library - which is what sounds like you've done.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  

  • How to get Requester Login information into the request dataset validator

    Friends,
    I need to check whether the requester is part of a group or not before submitting the request. If not I need to throw an error.
    Can you please let me know how to get Requester information.login into the request validator?

    Hi Thiago,
    I am getting the requester id from the requestData in the request data validator. Here is my full code for your reference.
    Bikash - I even tried with RoleManager service but still same error.
    public void validate(RequestData requestData)
    throws InvalidRequestDataException {
    tcUserOperationsIntf UserOppsIntf =Platform.getService(tcUserOperationsIntf.class);
    try
    tcResultSet result=UserOppsIntf.getSelfProfile();
    result.goToRow(0);
    String requesterID = result.getStringValue("Users.User ID");
    String userKey=result.getStringValue("Users.Key");
    System.out.println("Request Login:"+requesterID);
    if (isMemeber(getOIMGroupKey("testGroup"),userKey))
    System.out.println(requesterID+" is a Member");
    else
    System.out.println(requesterID+" is not a Member");
    String reason = "Note[REQUEST_SUBMISSION_ERROR].text:You are not authorized to submit this request.";
    throw new InvalidRequestDataException(reason);
    catch(Exception e) {
    e.printStackTrace();
    private String getOIMGroupKey(String GroupName) throws Exception
    String groupKey="";
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    HashMap searchFor = new HashMap();
    searchFor.put("Groups.Group Name", GroupName);
    tcResultSet results = groupInstanceOps.findGroups(searchFor);
    for (int i = 0; i < results.getRowCount(); i++) {
    results.goToRow(i);
    groupKey = Long.toString(results.getLongValue("Groups.Key"));
    System.out.println("GroupKey:"+groupKey);
    return groupKey;
    private boolean isMemeber(String groupKey,String userKey) throws Exception
    boolean member=false;
    try
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    long grpLong = Long.parseLong(groupKey.trim());
    tcResultSet grpResultSet = groupInstanceOps.getAllMembers(grpLong);
    for(int i=0;i<grpResultSet.getRowCount();i++)
    grpResultSet.goToRow(i);
    long usrKeygrp = grpResultSet.getLongValue("Users.Key");
    if (usrKeygrp==Long.valueOf(userKey))
    member=true;
    break;
    catch(Exception e) {
    e.printStackTrace();
    member=false;
    return member;
    }

  • Does anyone know how to get an ipad to use the wireless network from an airport?

    Does anyone know how to get an Ipad to use the wireless network from an airport express?

    By default, the AirPort Express will broadcast an unsecure wireless network with a Network Name of something like: Apple Network NNNNNN. Your iPad should "see" this network and be able to connect to it. Have you tried going through the iPad's Settings > Wi-Fi > Choose a Network... option. If so, does the AirPort's wireless network appear in the list of available networks?
    Can other wireless devices connect to the AirPort's network?

  • I just need to know how you get an iTunes library off the original hard drive of a mac and onto an external hard drive and still have it work normally?

    I just need to know how you get an iTunes library off the original hard drive of an imac and onto an external hard drive and still have it work as it normally would?

    http://support.apple.com/kb/HT1449

  • DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Hi,
    I don't know if this works:
    perform SET_TRAIL_BLANKS(saplgrap) using 'X'.  
    perform SET_FIXLEN(saplgrap) using '0' '060'.   "put length of your line from-to
    ... download ...
    It will put space at the end of your line, according to the length.
    Hope it works,
    Chang

  • I have an apple certified refurbished iPod touch 3rd generatio.  When playing the music with headphones, the music moves from song to song.  When it is on a docking station, it repeats the song.  Any ideas why or how to fix it?

    I have an apple certified refurbished iPod touch 3rd generatio.  When playing the music with headphones, the music moves from song to song.  When it is on a docking station, it repeats the song.  Any ideas why or how to fix it?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             

  • HT1222 My phone is telling me about a Software Update but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    My phone is telling me about a Software Update 7.1.1 but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    See if this helps:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

Maybe you are looking for

  • How can I make a line appear on each page in exactly the same position?

    Hello, I have created a simple line at the top and bottom of my page that I would like to be replicated on every other page in the document. Is there anyway in which I can make it recognise that I want these two lines to be used on every single page?

  • Error in writing to directory /u01/tmp  in SUSE 10

    Hi all, I am trying to install patch for oracle 9.2.0.6, right now DB version is Oracle 9.2.0.4 but when i try to install i am gettng an error oracle@icai-oracle:/bkp/patch/Disk1> ./runInstaller -ignoreSysPrereqs Starting Oracle Universal Installer..

  • PLEASE HELP, I have 3 questions...

    Okay, so I just bought my 30GB Ipod and have a few nube questions. 1. How can I scan the ipod for viruses? 2. Is it normal that with no music on the ipod it says i have something like 28 or 27 gigs available? Is this space just used up by games and o

  • Using VIEW inside a stored procedure

    Hi, So I have a View designed in one file that validates someone who is authorized. Then I have a stored procedure to display authorized stationeries created before a given date. Its takes a parameter @CreatedOn. How can I use VIEW in my stored proce

  • N70 ME functions problem

    I am using Nokia N70 MusicEdition. but it functions very slowly. can anyone of you plz tell me that is there any way to make it faster? then plz let me know about the way. Thanks.