arrangment table and function:

I have a virtual world who send a picture of the game info in a certain format. Receive it games and game according to the table sent import assets.

I have a function that must be a table in a certain format. Basically, because I'm a beginner and the function was made for me. I believe in its present form, BUT I don't know how to change it to receive the picture as I have.

The function (as I say did for me) as current needs simple strings passed in which is awesome, BUT I like 20 games and a virtual world set in place to receive data as the first table. I know I'm a little behind but things are based on my abilities, NOT on best practices. The step-by-step approach. I need to find a way to one loop each that accesses the first string as my rope from Apple that can use the same function. OR if I can separate the two strings as mc Apple and its AppleSound.

Y at - it nokind of the function as follows:

for each (var className:String (is the key mc) in rslClasses)

I would like to that data sent in my service: I can't change it at the moment. In the future, I'll definitely.

* This.definitionsArray = new Array();
this.definitionsArray.push ({mc: "Apple", sound: "AppleSound"});
this.definitionsArray.push ({mc: 'Banana', sound: "BananaSound"});
this.definitionsArray.push ({mc: «Pain», sound: "BreadSound"});
this.definitionsArray.push ({mc: "Cake" sound: "CakeSound"});
this.definitionsArray.push ({mc: 'Water', sound: "WaterSound"});
this.definitionsArray.push ({mc: "Tomato", sound: "TomatoSound"});
this.definitionsArray.push ({mc: "Sandwich", sound: "SandwichSound"});
this.definitionsArray.push ({mc: "Pizza", sound: "PizzaSound"});
this.definitionsArray.push ({mc: "Pear", sound: "PearSound"});
this.definitionsArray.push ({mc: "Orange", sound: "OrangeSound"}) ;*/

However, it is how the current function wants the data to be organized.
this.definitionsArray = new Array();
this.definitionsArray.push ("Apple");
this.definitionsArray.push ("banana");
this.definitionsArray.push ("bread");
this.definitionsArray.push ('cake');
this.definitionsArray.push ('water');
this.definitionsArray.push ("tomato");
this.definitionsArray.push ('Sandwich');
this.definitionsArray.push ('Pizza');
this.definitionsArray.push ("pear");
this.definitionsArray.push ("Orange");

The function is as follows:

private void onAssetsLoaded(e:Event):void
{
LoaderInfo (e.target) .removeEventListener (Event.COMPLETE, onAssetsLoaded);
var rslClasses:Array = ['Apple', 'Banana', 'Bread', 'Cake', 'Water', 'Tomato', 'Sandwich', 'Pizza', 'Pear', 'Orange'];
var rslClasses:Array;
rslClasses = definitionsArray;
bubbles = [];
for each (var className:String in rslClasses)
{
Bubbles.push (new bubble (className, className + "Sound")); This is more effective but my V.World happening in one below
Bubbles.push (new bubble (className, className));
}
placeBubbles();
trace ("BUBBLES =" + bubbles [0] [icon]); trace error - then who do we trace objects
}

They are actually objects - look at the line:

this.definitionsArray.push ({mc: "Apple", sound: "AppleSound"});

You use a shortcut to make an object (with brackets):

{mc: "Apple", sound: "AppleSound"}

This creates a new object with the properties 'mc' and 'his', with 'Apple' and 'AppleSound' values respectively.

Thus, definitionsArray is an array of these objects. To access what is in them, you can use the dot operator (o.mc) or the syntax of dictionary (o ["mc"]).

Tags: Adobe Animate

Similar Questions

  • WITH or CONNECT BY on several tables and function call

    Hi all

    I saw several post, documentation and several tutorials and cant' wrap your head around the query. I am creating a hierarchy of hosts in a model parent child and for each parent, I need to generate html code. I now have the id of the top most parent but has difficulty to get the logic to generate the output I need.

    In short, I have 1 parent with children and some of these children may be parents themselves and the parent over the top of the PAGE is always-1

    I need to call the pl/sql function to generate the code (only and only if it is a parent)

    I've been at this for awhile and only have the basics but are struggling to try to get what I need. I'im so confused at this point I don't know even how to explain it.

    So bear with me, I have included the test data for all who can help:

    -STEP 1-> OK

    -STEP 2-> DON'T know what I'm doing, but I'm generating an output of hierarchy

    -STEP 3-> paths are a bit inaccurate. DB1 and DB2 are repeated and their correct path is/LOCALHOST/RT1/SVR-DEV-01/DB1

    -STEP 4-> I'm so confused, I could not explain other then I have to call my function in reverse order of STEP2 so that more "host_object" really is a child and therefore function should not be called.

    -- Heis my query my base query
    
    SELECT DISTINCT h.id,
                    h.host_object_id,
                    h.display_name,
                    COALESCE(h3.host_object_id, -1) AS parent_id,
    
    FROM hosts h
    LEFT JOIN host_parenthosts h4 ON (h.id = h4.host_id)
    LEFT JOIN hosts h3 ON h3.host_object_id = h4.parent_host_object_id;
    

    It may be easier to do using PL/SQL. Here is an example that you may be able to take as a starting point. It uses recursion to write lines in a simple table, then writes the table at the end.

    SET SERVEROUTPUT ON
    DECLARE
    
      g_lines_list SYS.ODCIVarchar2List := SYS.ODCIVarchar2List();
      CURSOR c_top IS
      SELECT hst.id, hst.host_object_id, hst.display_name
        FROM hosts hst
       WHERE NOT EXISTS (SELECT 1
                           FROM host_parenthosts par
                          WHERE par.host_id     = hst.id
                  );
      l_id     PLS_INTEGER;
    
      FUNCTION Write_Log (p_line VARCHAR2, p_level PLS_INTEGER) RETURN PLS_INTEGER IS
      BEGIN
    
        g_lines_list.EXTEND;
        g_lines_list (g_lines_list.count) := LPad ('.', 2*(p_level+1), '.') || p_line;
        RETURN g_lines_list.count;
    
      END Write_Log;
    
      FUNCTION JSON_Expand (p_level PLS_INTEGER, p_parent_id PLS_INTEGER) RETURN VARCHAR2 IS
        l_chi_str          VARCHAR2(30);
        l_id             PLS_INTEGER;
        CURSOR c_chi IS
        SELECT hst.id, hst.host_object_id, hst.display_name
          FROM host_parenthosts          par
          JOIN hosts               hst
            ON hst.id               = par.host_id
         WHERE par.parent_host_object_id     = p_parent_id;
    
      BEGIN
    
        FOR r_chi IN c_chi LOOP
    
          IF l_chi_str IS NOT NULL THEN
            g_lines_list(g_lines_list.COUNT) := g_lines_list(g_lines_list.COUNT) || ',';
          END IF;
          l_id := Write_Log ('{Id: ' || r_chi.id || ', Name: ' || r_chi.display_name, p_level);
          g_lines_list(l_id) := g_lines_list(l_id) || JSON_Expand (p_level + 1, r_chi.host_object_id);
          l_chi_str := ', Children: [';
    
        END LOOP;
    
        IF l_chi_str IS NOT NULL THEN
    
          l_id := Write_Log (']}', p_level - 1);
    
        ELSE
    
            g_lines_list(g_lines_list.COUNT) := g_lines_list(g_lines_list.COUNT) || '}';
    
        END IF;
        RETURN l_chi_str;
    
      END JSON_Expand;
    BEGIN
    
      FOR r_top IN c_top LOOP
        l_id := Write_Log ('{Id: ' || r_top.id || ', Name: ' || r_top.display_name, -1);
        g_lines_list(l_id) := g_lines_list(l_id) || JSON_Expand (0, r_top.host_object_id);
      END LOOP;
    
      DBMS_Output.Put_Line ('Stored lines...');
      FOR i IN 1..g_lines_list.COUNT LOOP
        DBMS_Output.Put_Line (g_lines_list(i));
      END LOOP;
    
    END;
    /
    

    Strategic outcome on your data:

    Stored lines...
    {Id: 2604, Name: LOCALHOST, Children: [
    ..{Id: 2580, Name: VRT-42, Children: [
    ....{Id: 2597, Name: solaris},
    ....{Id: 2598, Name: dell-2},
    ....{Id: 2600, Name: acer-3}
    ..]},
    ..{Id: 2581, Name: RT1, Children: [
    ....{Id: 2591, Name: SVR-DEV-01, Children: [
    ......{Id: 2577, Name: DB1},
    ......{Id: 2578, Name: DB2}
    ....]}
    ..]},
    ..{Id: 2590, Name: VMHOST-01},
    ..{Id: 2591, Name: SVR-DEV-01, Children: [
    ....{Id: 2577, Name: DB1},
    ....{Id: 2578, Name: DB2}
    ..]},
    ..{Id: 2592, Name: VMHOST-02},
    ..{Id: 2594, Name: SRV-ORA-77},
    ..{Id: 2594, Name: SRV-ORA-77},
    ..{Id: 2607, Name: winserver2008}
    ]}
    
    PL/SQL procedure successfully completed.
    
  • Check a functional index on a table and its metadata

    Hello

    I have a functional base normal index (unique) defined on a table that uses a function of decoding and a combination of the columns of a table.
    For example: decode (status, 'A', column1 | column 2, column1 | Column2 | Column3)

    Now my question is, how do we ask these functional indices of the database to see what exactly is the function...

    On the database when I run a query: -.

    Select in all_indexes where index-name =: index_name, *.

    She retrieves the name of the stored index code as ncs $00025 (don't remember the exact value).

    How will I know what exactly is the function? (from table)

    and is it possible that I can query the data that has been indexed by this unique index, so that I can check why unique constraint is violated in some cases?

    Thank you and best regards,
    Sylvain

    How, we ask these functional indices of the database to see what exactly is the function...

     select * from user_ind_expressions
    
  • Problem of sorting of tables and... Using the functionality of the case

    OK, so im do this bit of code that solves the linear equations of 3 x 3, I have most of the code actually lack just 2 small pieces for value of ascetics, garlic try to describe them as detailed as I can, no matter what type of advice or advice with any of them would be greatly appreciated

    Some details of the program:

    Equation MUST be entered in a string and not must (and probably should) be able to do some difficult fixing

    It will be limited to the +'s and-'s signs

    Problem 1.

    I don't really know how to 'sort' my equation according to their variables, example:

    User input: - 2 y + 1 * x z - 1 = 2

    I can make it look like: - 2 y + z - 1 x 1 = 2

    I want what it looks like: 1 x-2 y - 1 z = 2

    I can handle sort the equation, IF I knew the order the user will add variables, the only thing that comes to mind is turning them into a table and make a case for each (x, y, z - x, z, y - etc.) and by using some kind of process of elimination to choose the table 'longer or shorter', I really haven't got much if this because it seems like a stupid idea , but it's the only thing it comes to my mind.

    Problem 2.

    So as im fixing the spaces between characters, at least, I find a '10', I don't want one "1 0", very roughly, I managed to work around this problem by using a "find and replace String", but I'm having trouble making a "case" for her, as in, I can't understand the entry of 'right' to a string of cases. " example:

    User input: 1 x-2 y - 1 z = 12

    The result inside the box is correct and resembles a '12', but as I don't know the correct entry, obviously my default case is empty, and it passes through, so the result on the outside is a '1 2 '.

    Any link for someone who fixed a similar problem or guides would be great, I'd also like to announce that 3 weeks ago, I've not even knew what was "LabVIEW", if you can 'dumb down' a little explanation would be greatly appreciated.

    You can try to use php code Analyzer to help analyze. The joint was a quickly hacked together solution that makes several assumptions (a big one being that the entry is correct and equal to is the last thing). This isn't really a complete solution.

    Sorry I didn't have the time to comment on it. If it seems odd, I was using money orders that got lost, when I recorded it for the previous version.

  • Help automate and functions by the numbers

    Hello!

    I need assistance with numbers 3.6.1 for OS X El Capitan. My question is really complicated, and I couldn't even begin to understand what to search using search engines, that is why I turn to the experts in communities for help.

    What I'm trying to do is set up a system where when an a table on a single sheet is changed, the information on a second table on a second sheet is updated to match. Specifically, on the first table on the first worksheet, I keep a spreadsheet of all the video games I have in my collection, and with each game video I save several data as platform, Publisher, genre and ESRB rating points, and so on, as follows:

    On the second picture, I have an assortment of tables of data that takes into account the number of games I have they fall into each of these same points data in separate tables, so, how many games I have for every platform, every Editor, in every kind and with each ESRB rating, as follows:

    I was able to set up all the tables on the second sheet automatic update of the charges for each individual in each category element, so if I add, say, a new game of Nintendo 3DS to the first sheet on the first table, the corresponding to "Nintendo 3DS" number on the table of the second sheet platform is automatically updated. I did this by manually applying the COUNTIF function to each individual B cell in each table and was pointing at the corresponding column of table on the first worksheet with the correspondent of expression of the cell [for Game Boy Advance, for example, it looks like this: COUNTIF (Collection::Table 1: $Platform, "Game Boy Advance")]. Part of what I want to accomplish is to have all the B cells on the second act of sheet as "smart cells", if you want to, where they are all automatically use the COUNTIF function using the expression in each corresponding to a cell, instead of the manual set up I have now. Is something like this? If so, I want finally to do is to have the paintings on the second sheet automatically be updated to take account of the new factors of table on the first worksheet. That is if I add a game to a new platform, we will say Virtual Boy, to the table on the table of the first sheet, is it possible to have the picture of the platform on the second sheet automatically add a new entry for Virtual Boy, and should the COUNTIF automatic formatting for the work of B lymphocytes as well, automatically count the number of entries of Virtual Boy in the platform column the first sheet as well?

    Here is a link to my spreadsheet in iCloud for reference (remember, it's 'View Only'): https://www.icloud.com/numbers/000AvaqQSb1iRb3-5XbyaoNww#My_Collection

    I hope all this makes sense to someone out there, I tried to explain as clearly as I could. I'm still sort of novice in numbers, if I appreciate any amount of teaching or imparting wisdom!

    Thank you

    -Kill

    Kill them salvation.

    for all B cells on the second act of sheet as "smart cells", if you want to, where they are all automatically use the COUNTIF function using the expression in each corresponding to a cell, instead of the manual set up I have now.

    Formula in B2 (and fill by dragging the handle downwards to fill yellow)

    = COUNTIF(Collection::Table 1::$B,A2)

    B2 in the platform table and paste in the length of Table B2. It will show zero because he seeks the wrong column in the table on the sheet Collection.

    Click on the "Collection::Table 1: $B" diamond in the formula editor to select.

    Go to the Map Collection and click on the label C.

    AHA! It always displays zero because does not match the description of length:

    "Very short (less than 5 hours)" on the card product and "Very short" on the Collection sheet.

    The descriptions must match exactly.

    The easy way to change them in the Collection journal is to sort the table. But first of all insert another column, and then type 1 then 2 and fill down. Then you can sort to the original order.

    Now sort the column Length.

    Change the description (copy and paste into each "block")

    Funny looks because the line height are different

    The COUNTIF works because the descriptions are now (the formula now displays column D because of the new column of original order of Collection).

    I'll post this before the time-out annoys me.

    Kind regards

    Ian.

  • Search for the string in the string table and see the following value in the line

    Hi, I'm new I have LV and I do a Vi that read worksheet values and generates 2d channels of the same spreadsheet table. For the moment everything I need is a function that find specyfic string in this table and show the next value in a line. As:

    Table:

    a; b
    c; d
    f; g

    example: find the 'c '.

    VI shoud show "d".

    Concerning

    Not a bad homework problem.  Do it with pencil and paper.  Write your table and pretend you're the computer.  What you want to do (step by step)?  What questions do you have?

    Now that the translation a bit to computers.  You mentioned that the data is in an array of strings.  What structures (LabVIEW) work with tables?  [Do you know how to work with tables?  [Otherwise, review some of LabVIEW Tutorial material - see top right of the first page of the Forum].  What do you know about channels?  What questions you need to ask questions on the channels?  What do you know about string functions?

    Watch these things in some LabVIEW code, 'feed' some data and see what he does.  If it seems to do things "unexplained", you can try to look at the block diagram to run by turning the performance highlight (and if you don't know what that means, use the help of LabVIEW and see the tutorials).

    Bob Schor

  • How to create a grid with the tables and Boolean values?

    As part of a larger project, I'm trying to create a Subvi, which will allow me to spend a "cursor" in a 3 x 3 matrix.

    It should be 2 Boolean inputs, one for move them down in the table and the other to move them to the right. Once reached the edge of the table, the "cursor" will start back at the beginning.

    I have a vague idea of a table to 2 dimensions with LED. Once 'down' has been selected, the corresponding light to (0,0), light (0.1). Goes the same for the button 'right '. When 'down' is pressed (0.2), the LED should turn off, and LED (0,0) must light up.

    I'm sure it has something to do with the initialization of the tables, but I can't seem to find the right way to do it.

    Any help is much appreciated. Thank you!

    Your array is always empty.  Look at the detailed help for the function page replace table subset.  He says that the function has no effect if the specified index refers to a location outside the table.

    What you see on the Panel is only a view and has nothing to do with what is in the table.

    Lynn

  • The tables and then splitting wrapping them (liquid)

    Just a simple question on here, is there away from separate data from the table for a web application? A perfect example would be when you create a check box form field. When the output data, it's just a unique string that looks like this "Ryan, Ashley, Melissa. Would be, I would like to do is to separate the data and then wrap with a < li >.

    I created the JQuery version of what works, but I'd like to see if it is far to do with liquid, as I'm new to the platform.

    
    
    

    {$('.padt20') .find ('ul') .each (function ()}

    var $this = $(this);

    Var words = $this.text () .split (",");

    var text = words.join ("< /li > < li > < class i ="fa fa-review"style =" margin-right: 10px; color: #F26228;) "" > < / i > ");"

    $this.html ("< li >" + "< i class ="fa fa-review"style =" margin-right: 10px; color: #F26228;) "" > < / i > "+ text +"< /li >");"

    });

    <ul>{{ArrayTag}}</ul>
    

    HI Ryan

    If we call to the output string "formdata", then all you have to do is

    {{formdata | divided: ","}}

    to get a table and then just loop through it:

    {% assign array formdata = | split: ',' %}}

    {% for me in table-%}

  • {{ i }}
  • {% endfor %}

    You must create a first variable because it will not work if you try to split in the loop for

    To bookmark this - the Developer Reference

    It provides a pretty good overview of what is available in cash & a lot of other things besides. I use it all the time.

  • CREATE TABLE and INSERT

    Hello

    I am a fairly new user for Oracle and have found this place to be very useful as I'm learning! One of the guidelines is to provide sample CREATE TABLE and INSERT data. I read the FAQ and in other forums to see if I could better understand this process, but I'm still struggeling reflected. Please can someone explain exactly what I do for these data, I want to be sure that I provided as useful information a lot in my posts to get help as soon as possible. I appreciate everything / all the answers!

    Hello

    Daniel Strong wrote:

    So, something like this:

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(220,AB,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(7,BB,SLOW,7);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(221,BC,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(8,BD,SLOW,2);

    INSERT INTO skills (user_id, skill_nm) VALUES (AB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BC, DOWN);

    INSERT INTO skills (user_id, skill_nm) VALUES (BD, SLOW);

    DESIRED RESULTS:
    MU_ID EXTERNAL_ID SKILL_NAME SKILL_LEVEL
    220 AB FAST 1
    221 AV FAST 1

    When you get a response, you want it works or is it OK if the answer causes errors?
    Obviously, you want people to post answers that work.  Make sure that the code of that validation works, too.  Test (and, if necessary, correct) your INSERT statements in your own development before posting on this forum system.

    The literal string values must be in single quotes.  I think you meant:

    INSERT INTO skills (external_id, skill_nm, mu_id, skill_level) VALUES (220, "AB", "QUICK", 1);

    Without the single quotes, AB and FAST are considered as column names or function.

  • Left join of the two tables and multiple values into a single value separated by commas

    Hello

    I have following tables with their structures and their data as below.

    CREATE TABLE 'BETODI '. "" BETINFO ".

    (

    VARCHAR2 (8 BYTE) "CURRENTPRESS."

    ENABLE 'TYPEIDCONTAINER' VARCHAR2 (30 BYTE) NOT NULL

    )

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A24G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A24D', 'Pensky-MARTENS');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ("A25D", "CMP");

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A25G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A26D', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A26G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ("A32G", "V-BFC3");

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A32D', "V-BFC2");

    CREATE TABLE 'BETODI '. "" BETMASTER ".

    (

    ACTIVATE THE "CUREPRESS" TANK (5 BYTES) NOT NULL,

    ACTIVATE THE "TYPE" VARCHAR2 (5 BYTE) NOT NULL,

    NUMBER (5.0) "LASTPCIRIM".

    )

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A24', '45 M 8', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A25', 42 16', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A26", 16' 45, 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A27", '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A28', '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A29', '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A30', '45MCH', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A31", "45MCH", 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A32', '45MCH', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A33', '45MCH', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A34", "45MCH", 16);

    These two tables have left join as

    BETMASTER. CUREPRESS = substr (BETINFO. CURRENTPRESS, 1, 3)

    now I want to have the data in the two tables with fields Curepress, Lastpcirim, typeidcontainer.

    Also something like

    Make a group of typeidcontainer if this value is greater than 1 by press separated the values of semicolon (;)

    So, for example above, we should be given as

    A24 PMC 15; PENSKY-MARTENS

    A25 15 PMC

    A26 15 PMC

    A27 16 (NULL)

    A28 16 (NULL)

    A30 15 (NULL)

    A31 16 (NULL)

    A32 16 BFC2-V; V BFC3

    A33 16 (NULL)

    A34 16 (NULL)

    How could do?

    My current request is as

    Select distinct Curepress, lastpcirim, typeidcontainer

    BETMASTER STD left join INF BETINFO

    on the trim (STD. CUREPRESS) = substr (trim (INF. CURRENTPRESS), 1, 3)

    but I am unable to get the values separated by commas.

    Any help would be appreciated.

    Thank you

    Mahesh.

    Hi, Mahesh,

    If you want to only 1 row of output for each distinct combination of currentpress and lastpcirim?  This sounds like a job for GROUP BY.

    And you want the row to contain a list of all different typidcontainers-delimited?  This sounds like a job for the aggregate LISTAGG function.

    WITH joined_data AS

    (

    SELECT DISTINCT

    MST.curepress, mst.lastpcirim, inf.typeidcontainer

    OF betmaster STD

    LEFT JOIN betinfo ON TRIM (mst.curepress) inf = SUBSTR (TRIM (inf.currentpress)

    1

    3

    )

    )

    SELECT curepress, lastpcirim

    LISTAGG (typeidcontainer, ',')

    THE Group (ORDER BY typeidcontainer) AS container_list

    OF joined_data

    Curepress GROUP, lastpcirim

    ;

    Unfortunately, you can't say LISTAGG (DISTINCT ...), so you should always get the separate containers how you already are.  (Note that the subquery is just what you posted).

    Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.  Don't forget to tell what version of Oracle you are using.  LISTAGG was new in Oracle 11.2.

    Why not add CHECK constraints (and perhaps triggers) to your tables, so that curepress and currentpress are not stored with the head or trailing spaces?  Then you wouldn't need to use the PAD in queries like this, and your code would be simpler and more effective.

  • Comparing the sum of the two tables and correct by difference of amount in its second t

    Hello guys,.

    I have a very difficult task that I can't get my head around.
    The sample data looks like this:

    Master table
    Request - booking - debit - credit - MasterAmout
    1------------1----------------D---------------------------------15.3
    1------------2----------------D---------------------------------480.6
    1------------3------------------------------C-------------------496.8
    ------------------------------------------- 0.9


    The slave table
    Demande---reservation---debit---credit---slaveamout---slavecorrection
    1------------1------------D------------------------------------15.3---------------14.5
    1------------2------------D------------------------------------480.6-------------480.6
    1------------3-----------------------------C-------------------496---------------496
    -------------------------------------------0.1--------------------------------------0.9


    The reservation have a total amount of 0.1, but must be corrected to 0.9 because the main table has 0.9.

    Reservation 1 requires a correction so the slave table also has a total of 0.9 (business rule is, only corrections on the first booking). So we have
    to change the amount of 15.3 to 14.5. I plan my SQL like this:

    1 reservations sum of two tables for each claim. Compare the two for each individual claim.
    2. If Captain sum the amount shows a difference between master / slave
    2.1 select top 1 table reservation slave for the specific claim and increase/decrease by the difference of these two amounts.

    Who is?

    Hello

    Use MERGE to actually do the UPDATE.
    The ROW_NUMBER analytic function to identify the first booking in slave (unless you can count on which the reservation = 1).

    MERGE INTO     slave     dst
    USING     (
         WITH     master_summary     AS
         (
              SELECT       claim
              ,       SUM ( master_ampount * CASE
                                       WHEN  debit  = 'D'  THEN -1
                                       WHEN  credit = 'C'  THEN  1
                                   END
                         )     AS balance
              FROM       master
              GROUP BY  claim
         )
         SELECT     s.claim
         ,     s.booking
         ,     SUM ( s.slave_amount * CASE
                                WHEN  s.debit  = 'D'  THEN -1
                                WHEN  s.credit = 'C'  THEN  1
                               END
                  ) OVER (PARTITION BY  claim) - m.balance     AS diff
         ,     ROW_NUMBER () OVER ( PARTITION BY  claim
                             ORDER BY        booking
                           )     AS r_num
         FROM     master_summary     m
         JOIN     slave          s  ON     m.claim     = s.claim
         )          src
    ON     (     src.claim     = dst.claim
         AND     src.r_num     = 1
         )
    WHEN MATCHED THEN UPDATE
    SET     dst.debit      = CASE
                        WHEN src.diff      <  0 THEN 'D'
                                       ELSE NULL
                     END
    ,     dst.credit      = CASE
                        WHEN src.diff      <  0 THEN NULL
                                       ELSE 'C'
                     END
    ,     dst.slaveamount = ABS (src.diff)
    ;
    

    If you would care to CREATE TABLE and INSERT statements for the sample data (showing the two tables, as they exist before the DML) then I could test this.

    The design of history seems very uncomfortable. Instead of the debit and credit columns, it would be much simpler to have positive and negative amounts. Is it really worth now both not corrected and corrected the amounts in the table on the slave, especially if you keep only versions corrected debit and credit columns?

  • Easy to change the owner of the TABLE (and according to indexes and views) available?

    I want to change the Owver from a TABLE (and the owner of all VIEWS and INDEXES in function).
    The only way that I know so far is something like

    CREATE TABLE < newschema >. < table_name > select * from < oldschema >. < tablename >;

    Then, slide old TABLE
    Recreate it possible all the CLUES and the views.

    It is kind of bulky.
    Especially when I don't know what indexes exist for a certain TABLE.
    When I investigate this and I have found 4 indexes so much work needs to be done.

    Is there a shorter, smarter way to accomplish the task.
    I prefer a SINGLE task of all-for-statement

    :-)

    Thank you
    Peter

    Hello
    export of diagram a (exp or expdp)
    import in diagram B (imp or impdp)

  • Private procedures and functions

    Hi all

    I am struggling to find a way to the list of private procedures and functions that are not declared in the package specification.
    Are there data dict. table or a view that could help

    DBA_procedures only the list procedure and functions that are declared in the package Spec.


    Thanks in advance.

    This is what the intended behavior is that if the procedure /function is prviate, it must not be visible. Have you tried to check in dba_source ?

    Aman...

  • TABLE and VAR


    I'm having a problem with VAR and TABLE functions. Can't seem to get the correct syntax, but followed Ser60.

    * TABLE arrayVariableName%{dimname/} = {constList}; *

    * VAR variableName [= value | http://forums.oracle.com/forums/]; *

    Error: 1200324 error in formula for compiling monthly *(Line 87): operator expected after * TABLE


    If anyone has some work I'd apreciate it.

    Also var can you use and string or is onlt digital vkaues?

    Thank you

    Tables and Vars contain digital values, not the values of string. They must also be used in a block as a statement

    VAR VarTest;

    (

    varTest = sales;

    Newsales = vartest;
    )

  • Popup do not insert in the table and not refreshing called page...

    Greetings



    Environment: APEX 3.1.1.00.09 on AIX 5.3 with 10 gr 2



    I read a lot of threads about my question and I think I'm getting closer to the answer but in some sort have combined a too big number of suggestions and am tripping over my own code.



    Please look at my sample application on apex.oracle.com:



    Workspace: galway

    User: gwicke

    Password: gwicke



    Please start by Page3, select any agency and then click on "add a new contract."

    There are currently a label "BOLD" < facilities > < strong > 'Add new Builder' which is a link that should open a popup window. Type a name in the field, and then click 'Create Builder'. This should INSERT the row into the table builder, close the pop-up window, assign the new name of the generator to the item page calling "Name Builder" and fill the screen element.



    In current state, the application will open the pop-up, allow entry and close by clicking on the button "create Builder." However, the new constructor is NOT inserted into the table and the calling page element is not met.



    Looking at the Page elements and Session State, I can see the correct values assigned to the elements "Pn_BULDER_NAME" on the popup page (4) and the calling page (2), but the value does not appear on the screen.



    I read here where there really two parallel universes, not forgiveness, Articles of two versions of the screen, a State of Session and the other which is displayed in the browser and there are measures to be taken to be sure that is displayed is updated to state of Session I want in this case.



    I entered the Javascript code on Page4 - header to set the 'passBack2()' function and the code in the section "Option URL Redirect" to the button "Add Builder" if all goes well perform protocol ARP for the INSERT, assign items to page 2 and close the pop-up window. He gets not quite everything.



    Any helpp is greatly appreciated. Thanks to Dene for most of the suggestions I have followed by code.



    -gary

    Hi Gary,.

    I think that there is a very simple solution to this topic - is not this spot really last night.

    First, Yes, you could use a "button" to manage the call for the popup - make sure that the button is a type of URL 'button', which is actually an A tag with the appeal under target URL. Otherwise, you could take you existing a tag and use the same class for one of your buttons attribute because this should make it look like a button.

    More importantly, however, I think we could do as:

    1. on your call popup page 2, clear cache for page 4 (the popup page) - I already did in your application by updating the url

    2. on page popup, allow the user to enter their desired P4_BUILDER_NAME value (not sure if you want to do something to make it unique?)

    3 let the user click on create on the shortcut menu. He will submit the page, that will make your P4_BUILDER_RANK (pk) value and insert a new record in the table (you might consider the creation of a sequence and a trigger to handle the creation of new value PK?).

    4 - assuming that the P4_BUILDER_RANK then exist (it would not if there is a mistake somewhere), then conditionally display a region that had a piece of javascript submit page 2 and closes then itself - we don't need to move everything back to page 2 (see below)

    5. as the P4_BUILDER_NAME and the P4_BUILDER_RANK exist in the session, to which page 2 be reloaded, (A) the selection list should be updated with the new generator (still not sure why all my entries appeared downstairs instead of in alphabetical?) and (B) the P2_BUILDER_NAME and the P2_BUILDER_RANK can have Post calculation calculations together (NVL) ((: P4_BUILDER_NAME,: P2_BUILDER_NAME) and NVL (: P4_BUILDER_RANK,: P2_BUILDER_RANK) respectively)-l' effect is, if there are the values stored in the page P4 elements, we use them, otherwise, we use whatever values were in the elements of page P2

    6 - Finally, to stop (5) that happens in all the loading of page 2, you would need to clear the cache of page 4 in as many places as possible - for example, branches for a 2 page or buttons on page 2

    The reason why we cannot pass values back to page 2, it is one of the elements is a list of selection. The value we want to select will appear not on the selection list until the page has been sent. So, we can set the value and submit because the value is not there. We can introduce and define the value, because the javascript don't know when the page has been updated (or, at least, you need an independent mechanism to identify, which can get complicated).

    So, in other words, as long as we know that if the values are in the session, we can use Post calculation calculations to set our fields to these values. The only thing to keep in mind is that we must ensure that these session values only exist when in need - so we empty the cache. This principle should work for any type of terrain - but as you have no doubt seen, simple text fields can be updated by the popup directly as the field must accept any value that we give.

    My only recommendation would be to completely remove the MRU of the page process because they are not necessary (they simply confuse the issue) and you could make your fetch PK and record insert into a single process - just to keep things clean and tidy, you understand!

    When I finished last night with your app, I will leave so that javascript can create an option on the select list, and then set the value. But the method described above seems to be much simpler.

    Andy

Maybe you are looking for