How can I retrieve values from integer array in sqlplus?

I'm trying to write a query against OEM grid tables to come up with the result to show all scheduled backup jobs, in OEM grid, there is a table sysman.mgmt_job_schedule, one of the column DAYS is defined as TYPE SYSMAN.MGMT_JOB_INT_ARRAY AS VARRAY(5000) OF INTEGER,
if I do select days from mgmt_job_schedule, it returns something like (2,3,4,5,,,,,,...), I want to retrieve the digits and translate them into Monday-Sunday in combination of other columns, but I'm new in varray, I don't know how can I retrieve the values in sqlplus, can you guys help me on that, My query is as follows, I got all the jobs I wanted already, just need to interpret on which day (week day) it is scheduled.
Thanks
select JOB_NAME, JOB_OWNER,job_type, mjs.START_TIME, DECODE(mjs.frequency_code,
1, 'Once', 2, 'Interval', 3, 'Daily', 4, 'Weekly',
5, 'Day of Month', 6, 'Day of Year', mjs.frequency_code) "FREQUENCY",
mjs.days
from mgmt_job mj, MGMT_JOB_SCHEDULE mjs
where mj.SCHEDULE_ID=mjs.SCHEDULE_ID
and mj.job_type='OSCommand'
and mjs.Frequency_code in (3,4)
and mj.is_library =0

select job_name, job_owner, job_type, mjs.start_time,
           decode (
                mjs.frequency_code,
                1, 'Once',
                2, 'Interval',
                3, 'Daily',
                4, 'Weekly',
                5, 'Day of Month',
                6, 'Day of Year',
                mjs.frequency_code
                "FREQUENCY", mjs.days, column_value
  from mgmt_job mj, mgmt_job_schedule mjs, table (nvl(days,sysman.mgmt_job_int_array(1,2,3,4,5,6,7)))
where       mj.schedule_id = mjs.schedule_id
           and mj.job_type = 'OSCommand'
           and mjs.frequency_code in (3, 4)
           and mj.is_library = 0you may need to tweak the values in sysman.mgmt_job_int_array: use less or other values or simply put them null ....

Similar Messages

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

  • How can I get values from listbox?

    Hi all,
    I need to get price values from Price List (Inventory -> Item Master Data screen). It's important to get values from field 'Price' BEFORE item will be added/updated.
    How can I get values from Pricelist listbox?
    Thanks for any suggestions or short sample code.
    Best regards,
    Andy

    Hi Andy
    Here is som sample code that will get the description of the price list and also the price that is displaying at the time. The item master must be open for this snippet of code
      Public Sub GetItemPriceFromOpenWindow()
            'this is assuming item master is open
            Dim oEdit As SAPbouiCOM.EditText
            oEdit = SBO_Application.Forms.GetForm("150", 1).Items.Item("34").Specific
            SBO_Application.MessageBox(oEdit.Value)
            Dim oCmb As SAPbouiCOM.ComboBox
            oCmb = SBO_Application.Forms.GetForm("150", 1).Items.Item("24").Specific
            SBO_Application.MessageBox(oCmb.Selected.Description)
        End Sub
    Hope it helps

  • How can I retrieve photos from my Apple TV (1st gen) to put onto my new iMac?

    How can I retrieve photos from my Apple TV (1st gen) to put onto my new iMac?

    See if this helps:
    http://support.apple.com/kb/TS1315
    Cheers,
    GB

  • How can i retrieve missing element in array

    how can i retrieve missing element in arrays if array length is exceeded

    Not sure about what the question means, but could it be that OP is not aware that the first element in an array is at index 0 (not 1) ?
    <a href="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html" style="background:url(http://java.sun.com/docs/books/tutorial/figures/java/objects-tenElementArray.gif) no-repeat; width:400; height:145;"></a>

  • HT201210 how can i retrieve texts from an earlier back up without changing all the other settings on my iphone?

    how can i retrieve texts from an earlier back up without changing all the other settings on my iphone?

    You can't. Restoring from a backup is all or none.
    You can use a utility such as this one to extract the messages from the backup on your computer but you can't re-transfer the messages to the Messages app on your iPhone.
    http://msb.macsupport-pr.com/

  • HT3275 how can i retrieve information from  time machine if my computer has less storage capacity? How can I access data that is on my time machine but can not be copied to a computer with less storage capacity? I used to have 180 GB, now I have 128 GB.

    how can i retrieve information from  time machine if my computer has less storage capacity? How can I access data that is on my time machine but can not be copied to a computer with less storage capacity? I used to have 180 GB, now I have 128 GB.

    Plug an external drive into the computer and use that to expand data onto.
    http://pondini.org/TM/16.html

  • Hi I lost all my contacts etc on my Iphone 4 how can I retrieve them from Icloud?, Hi I lost all my contacts etc on my Iphone 4 how can I retrieve them from Icloud?

    Hi
    I lost all my contacts etc on my Iphone 4, how can I retrieve them from Icloud, and how can I check the content of my Icloud backup copy?

    Welcome to the Apple Community.
    Your back up via iCloud is only for use for restoring your phone after wiping it. You can't inspect or utilise specific parts of the back up.

  • How can I retrieve playlists from another Spotify account

    How can I retrieve playlists from another Spotify account that the email is no longer active and I forgot the password to that account.

    Hey there , welcome to the community!
    Since you have two accounts, it would be best to just have Spotify close that account and have them transfer all your music to your new account. How does that sound? If you contact the accounts team through the online contact form and provide the account username with the e-mail address, date of birth, and zip code on the account then they should be able to do it for you! If you receive an automated e-mail directing you back to the community, just reply to it and you should receive a reply from a representative within 24-48 hours.

  • How can i get value from tilelist?

    I have created checkbox in itemRenderer that use for TileList
    How can i get value (checked) from checkbox?

    "Marsza" <[email protected]> wrote in
    message
    news:g6r6vj$di0$[email protected]..
    > Help me please....... T_T
    Could you rephrase the question?

  • I've messed up my iTunes Library, how can I retrieve it from Time Machine?

    I was trying to move my Library to an external hard drive...but had issues.  How can I retrieve my iTunes Library from Time Machine as it was originally so I can start all over?

    Navigate to your iTunes Library then Enter Time Machine. Time Machine should open at your iTunes Library. Select your iTunes Library/Restore

  • How can i store values from my String into Array

    Hi guys
    i wants to store all the values from my string into an array,,,, after converting them into intergers,,,, how i can do this becs i have a peice of code which just give me a value of a character at time,,,,charat(2)...BUT i want to the values from String to store in an Array
    here is my peice of code which i m using for 1 char at time
    int[] ExampleArray2 = new int[24];
    String tempci = "Battle of Midway";
    for(int i=0;i>=tempci.length();i++)
    int ascii = tempci.charAt(i); //Get ascii value for the first character.

    public class d1
         public static final void main( String args[] )
              int[] ExampleArray2 = new int[24];
              String tempci = "Battle of Midway";
              for(int i=0;i<tempci.length();i++)
                   int ascii = tempci.charAt(i);
                   ExampleArray2=ascii;
              for(int i=0;i<ExampleArray2.length;i++)
                   System.out.println(ExampleArray2[i]);

  • Without loops how can i read data from associative Array??

    Hi all,
    I am facing scenario like...
    i need to read data from associative array  without using loops is it possible,
    CREATE OR REPLACE PACKAGE BODY test_pkg IS
        TYPE t1 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       -- in array we can expect more than one row or sometimes no data also.
      FUNCTION test1(vt1 T1 DEFAULT CAST(NULL AS t1)) RETURN NUMBER IS
      BEGIN
        -- basically in array we'll get data of column2
        -- this loop should satisfies table1.colum2 = nvl(NULL, table2.colum2 )if array is null.
        -- if array is not null then only compare with array values
        FOR i IN (SELECT t1.colum1,t1.column2
                         FROM table1 t1, table1 t2
                              WHERE t1.colum1 = t2.column1
                                AND t1.colum2 = nvl(vt1, t2.colum2)
          LOOP
            generateTEXT(i.colum1, i.colum2);
         END LOOP;
      END test1;
    END test_pkg;
    in table1 we have date like...
    colum1          column2
    Jan                  1
    Feb                  2
    Mar                  3
    if i call select test_pkg.test1(1) from dual then output should
    be Jan..
    and
    select test_pkg.test1(null) from dual then it should display all elements from table1.
    Jan                  1
    Feb                  2
    Mar                  3,
    Thanks for your quick replay..

    i need to read data from associative array  without using loops is it possible,
    No - you would need to create a SQL type and then use the TABLE operator to unnest the collection.
    create or replace TYPE my_nums IS TABLE OF INTEGER;
    DECLARE
    --  TYPE my_nums IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
      v_nums my_nums := my_nums(1, 2, 3);
      v_total number;
    BEGIN
      select sum(column_value) into v_total from table(v_nums);
      DBMS_OUTPUT.PUT_LINE
        ('Sum of the numbers is ' || TO_CHAR(v_total));
    END;
    Sum of the numbers is 6

  • How to get a value from an array in a nested loop

    Hi
    I have an array inside a four loop. The for loop (it is supposed to run 4 times) is further inside a while loop. The array consists of four elements and the values each of these elements are fed before running the program. To receive the values of each of these elements one by one outside the for loop, I am using the function index array. To receive all the values one by one, I created a shift register and wired the output of the index arrray to it. The problem is that instead of receiving all the values one by one, I am receiving only the value in the fourth
    element of the array...Can someone please help me..

    The attached file is my program.
    Attachments:
    Value from array.vi ‏25 KB

  • How can I get values from a checkbox group?

    I have been developing a web application with Creator EA 2 and am trying to finish all the functionality before switching to 2. The last thing I have to do is pick up the status of checkboxes that I put in the page with the checkbox group component. Getting stuff from other fields is easy in the code for the page with a statement like: this.fieldname.getText() or ...getValue(). When you enter a line like this, Creator is helpful and gives you the completion choices. I tried some for the checkbox group, but none seem to give me what I want. What I want is the status ( true or false, 0 or 1, ...) for each checkbox in the group. I would appreciate advice on a simple way to get this. Thanks.

    You do not necessarily need to bind selected to an array. You might do that if you want to put the array in a session bean, but otherwise, the binding isn't necessary.
    Earlier, I provided a link to the Delving into Components tutorials. Here is an excerpt:
    "For the items property, you specify a display label and a return value. The selected value returns an array of objects of the same type as the return values. If you use a Default Options component to specify the items and return values, selected returns an array of String objects.
    The values in the selected array match the return values of the selected checkboxes."
    To illustrate, here is how to get the selected values without binding to an array. In this example, the id for the drop-down list is dropdown1.
        public void prerender() {
            if (checkboxGroup1.getSelected() != null) {
                String str="You selected ";
                String[] userSelections = (String[]) checkboxGroup1.getSelected();
                for (int i=0; i < userSelections.length; i++) {
                    str+= userSelections[i] + " ";
                staticText1.setText(str);
        }Hope this helps,
    Chris

Maybe you are looking for

  • I have home sharing activated, but it is not showing up on my iTunes sidebar.

    I have recently bought an ipod touch 4th gen. I had my iTunes on one computer, then turned on home sharing, and it was fine. I was transfering my library and a moie was copying. I decided to brows the book store and purchased a book. When the book fi

  • ADF View objects question

    Hello, I created a view object (which bases on an entity object) that I'd like to use for searching for records in a table called "CARS". Cars will be searched by names. I also have a JSP page for adding cars (administration functionality). The situa

  • ADF independent transactions

    Hi all, I'm trying to implement independent transactions in JSF/ADF. At the next lines I'll try to explain the process that I have followed: - First of all we know there are two ways to obtain independent transactions (e.g. different executions of th

  • Error in PDF File APEX

    Hi!! i´m new in APEX, i´m creating a custom PDF, i have downloaded the Oracle BI, and i generate my *.rtf Archive, all is OK, except when i try to open the PDF file, i get an error that i can't see, but i can read this when i export to *.doc file. i

  • SSAS Cube - Throws "attribute key not found" when the key exists

    Hi, I created a cube with 2 fact tables ( CabecNF and ItensNF ) and with some dimensions, in this case Cliente. When I proccess the cube it throws this error: Internal error: The operation terminated unsuccessfully. Errors in the OLAP storage engine: