Pulling data as the values do not match in the 2 tables.

Hello guys,.

I have the following problem

I have 2 tables one is 2nd car_models is back

Model - Min_Price - Max_Price (of car_models)

Honda1 - 20 000 - 30, 000
REST-25, 000-35, 000

We are joining two tables by column name 'Model', lets imagine that I have 5 values of the model (Honda1, Honda2, Honda3, Honda4, Honda5). These other values (Honda3, Honda4, Honda2, Honda5) are only available in the 2nd table (income).

If the value is given in the table car_models as for Honda1, then we use 20K and 30K.

If the value is indicated in the table car_models as for the 'REST', then we K 25 and 35K for all other models (Honda3, Honda4, Honda2, Honda5).


How can we create a join on these tables?

I'll take a stab at this:

select * from (
  select r.model, min_price, max_price,
  row_number() over(
    partition by r.model order by decode(cm.model,'ALL',1,0)
  ) rn
  from car_models cm
  join revenue r on cm.model in (r.model, 'ALL')
)
where rn = 1;

Tags: Database

Similar Questions

  • OBIEE error - Datetime-01-01 value does not match the specified format

    I get this error after the promotion of Production. It works perfectly well on the Test Server.

    I am using SQL server. After launching the date as a varchar, it works fine.

    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 43119] Query Failed: [nQSError: 46046]-01-01 Datetime value does not match the specified format. (HY000)

    Gurus of OBIEE please help

    JD

    I found the solution as well.

    The Windows Server ODBC driver was old (Version 6). I have who has upgraded to SQL Server Native Client 11.0 and everything works fine.

  • I have a registration error trying to download a disc. It is said, your operating system Date and time format do not match the expected for PM Fastrack run format.

    Error in saving of the PM FASTrack.
    Impossible to analyze the dayYour operating system Date and time format do not match the expected for PM FASTrack run format. The format should be mm/dd/yyyy hh: mm:. The format is

    It's my complete error message. The time is set in this format on the computer. How should I do?

    Hello Murphy,

    Thanks for posting your question on the Forums of community of Microsoft.
    From the description of the question, I understand this format date and time do not match for PM FASTrack run.
    Let me go ahead and help you with the issue.
     
    You did changes to the computer before the show?
     
    I suggest for the link and follow the steps in the article, and check if this can help:
    Change the display of dates, times, currencies, and measures
     
    Also, check out the support links:
    PM FASTrack support.
     
    I hope this helps. If you have any other queries/issues related to Windows, write us and we will be happy to help you further.
  • Code to get the data in the child table in composite SOA using the IOM APIs

    Hi all

    I am a new bie to IOM. I have a query related to obtaining data in the child table using the API of the IOM in the task of embeded java SOA composite.

    I've created a workflow that has a form of child of providing service of slef. I created a composite SOA custom also approval. In the composite approval I have embedded java code and I want to get the values entered in the child form using the API IOM inot the java code embeded in composite SOA.

    I tried gettting the child form data by using getChildAttributes(), but I'm getting the following exception.

    The local Exception stack:
    Exception [EclipseLink-7242] (Eclipse - 2.1.3.v20110304 persistence Services - r9073): org.eclipse.persistence.exceptions.ValidationException
    Description of the exception: an attempt was made to navigate a relationship using indirection that had a null Session. This often happens when an entity has a relationship of LAZY not instantiated is serialized and this lazy relationship is crossed after serialization. To avoid this problem, instantiate the LAZY relationship before serialization.
    at org.eclipse.persistence.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:994)
    at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:218)
    at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83)
    at oracle.iam.request.vo.RequestBeneficiaryEntityAttribute.getChildAttributes(RequestBeneficiaryEntityAttribute.java:100)
    to com. CASApproval.main (CASApproval.java:137)

    Please suggest me if I'm following the correct procedure of the child form data or if we can use another approach.

    Can we get the data using formInstanceOperationsIntf.getProcessFormChildData ().

    Thanks in advance for the help.

    Thank you
    PT

    When you're in approvals, there is no form of process data. Process form data would come only when approvals are completed. If you want to read data from the child form of the DataSet (i.e. the form object as in OIM9.x) you can use the RequestService on the id of the request and read the data. Or another approach would be to the child the dataset data value in the payload of the request and read the XML payload in the composite.
    Let me know if you need more information about the second approach. As for the first approach, search through the forums here and you should find my previous posting on how to reach child dataset values using the ask service API.

    -Marie

    Found these for you:
    OIM11G: Way to get values from dataset of the application for approval
    Re: How to get the value of the AD details of payload of SOA user group

  • Historical data in the audit tables

    We are facing the following requirement of our current customer.

    They run a number of workflow manually for a few years, and they have retained the historical data in Excel spreadsheets. Now, they want to start using the BPM Suite.

    They would like to query power and display the track Audit Suite BPM of all workflows, i.e. not only those who will be executed with BPM Suite in the future, but also those who have been stored in spreadsheets Excel over the years.

    I have a few questions about this:

    What is a reasonable demand?
    My guess is that we need to load historical data in the tables of audit BPM (BPM_AUDIT_QUERY, etc.), is - that correct?
    Any suggestions on how to get there?

    I was reading the doc, Googling the web and searching this forum and I have not found yet any relevant material on this subject.

    Concerning

    Juan

    Published by: Juan Algaba Colera on October 11, 2012 04:14

    It would be very difficult to directly load their data in the audit tables. Also check tables are stored in the soa-infra schema which is usually configured to be served after a certain period of time so that it grows indefinitely, because it contains all the runtime information as well. You will need to determine how long they need these historical data and configure properly the purge and the size of the DB correctly for this amount of data.

    If data in excel are truly one, the new BPM process the best way to get the audit data in the process can be use the APIs to create instances of the process and then automate execution of each task as defined in the spreadsheets. This way these past instances have been run through the system.

    In most cases this is not done however. Most of the customers usually somewhere archived these worksheets in case they need to recover, but will not try to make that old data visible from the BPM workspace and to view an audit trail.

    Thank you
    Adam DesJardin

  • How to insert 10,000 records test data into the emp table

    Hi I am new to oracle can someone please help me write a program so that I can insert the test data into the emp table
    SELECT       LEVEL empno,
                 DBMS_RANDOM.string ('U', 20) emp_name,
                 TRUNC (DBMS_RANDOM.VALUE (10000, 100000), 2) sal,
                 DBMS_RANDOM.string ('U', 10) job,
                 TO_DATE ('1990-01-01', 'yyyy-mm-dd')
                 + TRUNC (DBMS_RANDOM.VALUE (1, 6000), 0)
                   hiredate,
                 CASE
                   WHEN LEVEL > 10 THEN TRUNC (DBMS_RANDOM.VALUE (1, 11), 0)
                   ELSE NULL
                 END
                   mgr,
                 TRUNC (DBMS_RANDOM.VALUE (1, 5), 0) deptno
    FROM         DUAL
    CONNECT BY   LEVEL <= 10000
    
  • How to insert the legacy data into the QP_RLTD_MODIFIERS table?

    How insert Legacy data into the QP_RLTD_MODIFIERS table in the instance of R12.

    I would use the QP_Modifiers_PUB API. Process_Modifiers to push the old data on prices in R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environment, only the promos are given in this table).

  • It does not work when you use the trigger to check the data of the other table.

    Please help me with this, I put a trigger on a table, but it can not work as I expect.

    case study: a class has many students, one of them is going to match.
    The purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to.
    Oracle version is 10.2.0.1.0.
    --table:
    DROP TABLE STU;
    DROP TABLE CLASS;
    
    create table CLASS(
    CID     VARCHAR2(5)   PRIMARY KEY,
    CNAME   VARCHAR2(20)  NOT NULL,
    SCHOSEN VARCHAR2(5));
     
    create table STU(
    SID     VARCHAR2(5)   PRIMARY KEY,
    SNAME   VARCHAR2(20)  NOT NULL,
    CID     VARCHAR2(5)   NOT NULL REFERENCES CLASS(CID) ON DELETE CASCADE);
    
    --data:
    --CLASS
    INSERT INTO CLASS(CID,CNAME) VALUES(1,'SUN');
    INSERT INTO CLASS(CID,CNAME) VALUES(2,'MOON');
    INSERT INTO CLASS(CID,CNAME) VALUES(3,'EARTH');
    --STU
    INSERT INTO STU VALUES(1,'JACK',1);
    INSERT INTO STU VALUES(2,'TOM',1);
    INSERT INTO STU VALUES(3,'LILY',2);
    INSERT INTO STU VALUES(4,'DUSTIN',3);
    
    --TRIGGER
    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    
    DECLARE
    DUMMY INTEGER;
    INVALID_STU EXCEPTION;
    VALID_STU EXCEPTION;
    MUTATING_TABLE EXCEPTION;
    PRAGMA EXCEPTION_INIT(MUTATING_TABLE, -4091);
    
    CURSOR DUMMY_CURSOR (ST VARCHAR2, CL VARCHAR2) IS
      SELECT SID FROM STU, CLASS
      WHERE STU.SID=ST AND STU.CID=CLASS.CID AND CLASS.CID=CL
        FOR UPDATE OF CLASS.SCHOSEN;
    
    BEGIN
      OPEN DUMMY_CURSOR(:NEW.SCHOSEN, :NEW.CID);
      FETCH DUMMY_CURSOR INTO DUMMY;
      IF DUMMY_CURSOR%NOTFOUND THEN
        RAISE INVALID_STU;
      ELSE
        RAISE VALID_STU;
      END IF;
      CLOSE DUMMY_CURSOR;
    EXCEPTION
      WHEN INVALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('PLEASE RE-ENTER CLASS ID AND STUDENT ID AS CLASS OR STUDENT IS NOT VALID.');
      WHEN VALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('STUDENT CHOOSE SUCCEFULLY!');
      WHEN MUTATING_TABLE THEN
        NULL;
    END;
    /
    Just copy and paste on it and try to run next:
    UPDATE CLASS
    SET SCHOSEN = 3
    WHERE CID = 1;
    Clearly, you can't student who is 3 as to Member of class 1. Please help me. Thank you.

    Published by: 991096 on March 1st, 2013 02:36

    Published by: 991096 on March 1st, 2013 03:03

    Published by: 991096 on March 1st, 2013 03:11

    Hello

    991096 wrote:
    1. the purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to. Then, when I try to choose 3 student-member of correspondence of class 1, should give me "PLEASE RE-ENTER ID AND STUDENT ID AS CLASS or STUDENT not IS NOT VALID."

    Then do something like this:

    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    DECLARE
        sid_found     stu.sid%TYPE;
    BEGIN
        dbms_output.put_line (:NEW.schosen || ' = schosen entering check_schosen');             SELECT  sid
             INTO    sid_found
         FROM      stu
         WHERE     sid     = :NEW.schosen
         AND     cid     = :NEW.cid
         AND     ROWNUM     = 1     -- to avoid TOO_MANY_ROWS
         ;
    EXCEPTION
        WHEN  NO_DATA_FOUND
        THEN
         RAISE_APPLICATION_ERROR ( -20000
                        , 'Please re-enter class id and student id as class ('
                          || :NEW.cid
                          || ') or student ('
                          || :NEW.schosen
                          || ') is not valid.'
                        );
    end;
    /
    

    DBMS_OUTPUT creates only a message. The message may not be displayed, and if this is the case, then the user cannot see it. The DML will still take place.
    I used instead, RAISE_APPLICATION_ERROR to keep the DML does not happen. It displays a message like

    ORA-20000: Please re-enter class id and student id as class (1) or student (3) is not valid.
    

    ' 2 ' game ' means ' an official competition in which two several people or teams competing.

    What individuals or teams are competing in this case?
    In any case, the question wasn't 'that 'game' means', but

    Frank Kulash wrote:
    What do you mean when you say "going to match?

    I think that now you're saying that the new values of (class.cid, class.schosen) must be equal to (or "fit") some existing (stu.cid, stu.sid).

    3. thanks for your tip, I learned how to use '{code} '.

    4. it's really goes with the exception of MUTATING_TABLE. So, how do to fix the trigger to show me INVALID_STU EXCEPTION when I try to choose a student does not belong
    a class?

    Don't refer to the table of class in the trigger, and the error table mutation occur. All the information you need are in the stu table, so there is no need to query the table of class, anyway.

  • Plugin data: determine the string table values ranging

    Hello, once again

    I have always fought with a use composed of data from the separate tab

    When I read a line via

    sMyLine = file.getnextline

    and try to extract the values with

    aMyValues = split (sMyLine, vbTab etc.)

    the returned array is Variant.

    Now I try to assign values of this array of different channels, for example

    for i = 1 to Ubound (aMyValues)

    ... root channelgroups (j). Channels (i). Values (k) = aMyValues (i)

    next

    This results in an error message "this channel has been generated with e64 Type, values to fill must not be of type VT_BSTR" or what would be the translation into English.

    So I have to turn the table variant to a R64-table. However cdbl (aMyValues (1)) will not work.

    Workaround heavy:

    When reading data with

    root... channelgroups (1). Channels (1). Values (1) = file. GetNextStringValue (e64)

    the value is of the appropriate type. But this translates many read-only operations.

    Is there a way to read in one line and add the values of channels? File.GetStringBlock in the examples is especially used with DirectAccessChannels.Add. But I don't want the new n-channel, but rather add to already existing ones.

    Thank you for your support.

    Michael

    Hello

    I think that there are several ways to reach your goal.

    If you want to assign the values in your table variant of a digital channel, you can use the File.Formatter.ParseString () method. Please make sure you that trainers for your numeric values are defined according to the needs, for example, File.Formatter.DecimalPoint, etc.

    File.Formatter.DecimalPoint = «»
    ...
    for i = 1 to Ubound (aMyValues)
    ... root channelgroups (j). Channels (i). Values (k) = File.Formatter.ParseString (aMyValues (i), eR64)
    next

    The best way is to use the StringBlock object. If you do not want to create a new channel for each DirectAccessChannel, you can use ProcessedChannel to add multiple DirectAccessChannels, for example

    Dim processedChn: Set processedChn = channelGroup.Channels.AddProcessedChannel ("ChannelName", eR64, eConcatProcessor)
    ...
    processedChn.Channels.Add (DirectAccessChannel)

    I hope this helps.

  • My procedure is not load data in the specified table

    Hi friends,
    I get the data in a table and try to insert into a temporary table...
    now when I run the following procedure, it is not copying the elements of the table in the table of tepm...
    I can only copy the sequence and "NP' I've hard coded...

    ----------------------------
    create or replace package body is asg_change
    procedure p1 (p_err_buf out VARCHAR2
    some p_ret_code number)
    is
    v_asg_no varchar2 (30);
    v_per_id number (30);
    date of v_eff_st_dt;
    date of v_eff_end_dt;
    v_org_name varchar2 (100);
    v_err_mesg varchar2 (1000);

    cursor c1 is
    (SELECT paaf.assignment_number, paaf.person_id
    paaf.effective_start_date
    paaf.effective_end_date
    hr_general.decode_organization (paaf.organization_id)
    OrganizationName
    in v_asg_no, v_per_id, v_eff_st_dt, v_eff_end_dt, v_org_name
    BY the ADP per_all_assignments_f
    WHERE THERE ARE
    (SELECT 1
    OF per_all_assignments_f paafi
    WHERE the NVL (paafi.organization_id, 0)! =
    NVL (paaf.organization_id, 0)
    AND BETWEEN paafi.effective_start_date (paaf.effective_start_date - 1).
    AND paafi.effective_end_date
    AND paafi.assignment_id = paaf.assignment_id)
    );
    Start
    for rec loop c1
    insert into org_change values(xxkdd_asg_seq.nextval,'NP',v_org_name,v_eff_st_dt,v_per_id,v_asg_no);
    end loop;
    EXCEPTION
    WHILE OTHERS THEN
    v_err_mesg: = v_err_mesg |' | ' || 'Error, go look for the details of the assignment' | TO_CHAR (SQLCODE) | » -'|| SQLERRM;
    end;
    end;
    ---------------------------------------------------
    It's the temporary table, I created

    create table org_change (sl_no number (10), status varchar2 (100), nom_org)
    VARCHAR2 (100), the date of FFECTIVE_START_DATE, person_id number (10), assignment_number varchar2 (30))
    ---------------------------------------------------
    This is the insert statement

    insert into org_change values(xxkdd_asg_seq.nextval,'NP',v_org_name,v_eff_st_dt,v_per_id,v_asg_no);

    am I right giving it pls let me know

    There are 609 selected lines and am able to see 609 temporary table rows of data in the columns of the third column

    Thank you

    Published by: 776317 on April 11, 2011 16:13

    Published by: 776317 on April 11, 2011 16:14

    I suggest you to go through this link on how to write the pl/sql block.

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/TOC.htm

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/sqloperations.htm#sthref1273

    For your question it could be rewritten as follows:

    create or replace package body asg_change
    is
      procedure p1...
      is
      ....
      begin
      ....
       insert into org_change
      (
        sl_no, status, org_name, effective_start_date, person_id, assignment_number
      )
      SELECT xxkdd_asg_seq.nextval, 'NP' status, hr_general.decode_organization (paaf.organization_id) organization_name, paaf.effective_start_date, paaf.person_id, paaf.assignment_number
      FROM per_all_assignments_f paaf
      WHERE EXISTS
      (
         SELECT 1 FROM per_all_assignments_f paafi
         WHERE NVL (paafi.organization_id, 0) != NVL (paaf.organization_id, 0)
             AND (paaf.effective_start_date- 1) BETWEEN paafi.effective_start_date AND paafi.effective_end_date
             AND paafi.assignment_id = paaf.assignment_id
      ) ;
     end p1
    end asg_change;
    

    Also check this post.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:47458244605081

    Key excerpts from the post above

    Tom-- I subscribe to your SQL mantra for data (and truly, is there anything else? :))
    which is:
    
    1. Do it in a single SQL statement if at all possible.
    2. If you cannot, then do it in PL/SQL (as little PL/SQL as possible!).
    3. If you cannot do it in PL/SQL, try a Java Stored Procedure
    (extremely rarely necessary with Oracle9i and above.)
    4. If you cannot do it in Java, do it in a C external procedure.
    (when raw speed, or 3rd party API written in C is needed.)
    5. If you cannot do it in a C external routine, you might want to seriously think
    about why it is you need to do it...
    

    I hope this helps.

    Concerning

    REDA

  • Pulling data from the class on a MovieClip array

    I am trying to create this slideshow application that displays product information (Tennis rackets) issues of different categories. A great programmer advised me that OOP would be a way to go, however I'm having a difficulty with it.

    I created:

    A document class called CustomClass--> This class downloads all data from the server and pushing the content in the XML based on a category tables. These berries are public, there is also a funciton iterateArray that places the children information somewhere.

    I would like to have 3 different movie clips

    1 screen-> Welcome Message

    2nd screen-> first table

    3rd screen-> second table Dispalyed

    package {
         
         import flash.display.*;
         import fl.transitions.*;
         import fl.transitions.easing.*;
         import flash.net.*;
         import flash.events.*;
         import flash.text.*;
         import flash.text.AntiAliasType;
         import flash.utils.*;
         import bucket_right;
         import bucket_left;
         import firstScreen;
         import secondScreen;
         
         
         public class CustomClass extends MovieClip {
              
              
              [Embed(source="C:/WINDOWS/Fonts/Eurosti.ttf", fontFamily="Euro")]
              public  var EuroEmbedded:Class;
              
              
              //XML responsible variables 
              private var xmlLoader:URLLoader;
              private var xmlContainer:XML;
              private var xmlList:XMLList;
              
              //Array specific variables 
              public var rackUSA:Array;
              public var rackOther:Array;
              public var imagesArray:Array;
              
              //Position Variables 
              public var position:Number;
              
              //Movie Clip Related Data
              public var bucket:MovieClip;
              public var firstScreenShow:MovieClip;
              public var secondScreenShow:MovieClip;
              
              //Text Field Formatting
              private var brandnameTxt:TextFormat;
              private var detailsTxt:TextFormat;
              private var priceTxt:TextFormat;
              public  var euroEmbeddedFont:Font;
              private var fontNeeded:String;
              
              
              //Set up Timer Vars 
              private var applicationStart:Timer;
              private var delay:Number;
              private var repeat:Number;
              
              //Positioning Variable 
              private var positionBuckets:Boolean = true;
              
              //This is the constructor of the application 
              public function CustomClass() {
                   euroEmbeddedFont = new EuroEmbedded();
                   fontNeeded            = euroEmbeddedFont.fontName;
                   position         = 5;
                   rackUSA            = new Array();
                   rackOther            = new Array();
                   imagesArray       = new Array();
                   
                   delay                 = 2000;
                   repeat                = 1;
                   applicationStart = new Timer(delay, repeat);
                   LoadXML();
              }
              
              private function LoadXML() {
                   xmlLoader = new URLLoader();
                   xmlLoader.load(new URLRequest("http://localhost/xml/index.php"));
                   xmlLoader.addEventListener(Event.COMPLETE, populateInfo);
              }
              
              public function populateImages(imgname:String, imgurl:String):* {
                   var imageLoader:Loader = new Loader();
                   //imgname = imgname.split(".gif").join("");
                   //imageLoader.name = imgname;
                   //imagesArray.push(imageLoader);
                  imageLoader.load(new URLRequest(imgurl));
                   return imageLoader;
              }
              
              public function getArray(arrayName:Array) {
                   return arrayName;
              }
              /*public function startApplication() {
                   applicationStart.start();
                   applicationStart.addEventListener(TimerEvent.TIMER_COMPLETE, firstScreen);
              }
              
              public function firstScreen(e:TimerEvent) {
                   removeChild(secondScreenShow);
                   applicationStart.reset();
                   applicationStart.removeEventListener(TimerEvent.TIMER_COMPLETE, firstScreen);
                   firstScreenShow = new firstScreen();
                   addChild(firstScreenShow);
                   //firstScreenShow.iterateArray(rackUSA);
                   applicationStart.start();
                   applicationStart.addEventListener(TimerEvent.TIMER_COMPLETE, secondScreen);
              }
              
              public function secondScreen(e:TimerEvent) {
                   applicationStart.reset();
                   applicationStart.removeEventListener(TimerEvent.TIMER_COMPLETE, secondScreen);
                   removeChild(firstScreenShow);
                   secondScreenShow = new secondScreen();
                   addChild(secondScreenShow);
                   //secondScreenShow.iterateArray(rackOther);
                   applicationStart.start();
                   applicationStart.addEventListener(TimerEvent.TIMER_COMPLETE, firstScreen);
              }*/
              
              public function setFontFormat() {
                   //Text Formatting for Brand Name Field
                   brandnameTxt = new TextFormat();
                   brandnameTxt.font = fontNeeded;
                   brandnameTxt.color = 0x006699;
                   brandnameTxt.size = 20;
                   brandnameTxt.bold = true;
                   //
                   
                   //Text Formatting for Country/Material
                   detailsTxt = new TextFormat();
                   detailsTxt.font = fontNeeded;
                   detailsTxt.color = 0x006699;
                   detailsTxt.size = 10;
                   detailsTxt.bold = false;
                   
                   //Text Formatting for Country/Material
                   priceTxt = new TextFormat();
                   priceTxt.font = fontNeeded;
                   priceTxt.color = 0x9DE36E;
                   priceTxt.size = 20;
                   priceTxt.bold = true;
              }
              
              public function tweenBucket(bucket:MovieClip) {
                        var bucketImgTrans = new TransitionManager(bucket);
                        bucketImgTrans.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
              }
              
              private function iterateArray(contentInfo:Array) {
                   this.setFontFormat();
                   
                   for (var c:uint = 0; c < contentInfo.length; c++) {
                             var brand:TextField   = new TextField();
                             var country:TextField = new TextField();
                             var made:TextField    = new TextField();
                             var cost:TextField    = new TextField();
                             var img:Loader;     
                             brand.embedFonts        = true;
                             
                             img            = contentInfo[c].picture;
                             brand.text   = contentInfo[c].brand;
                             country.text = contentInfo[c].country;
                             made.text    = contentInfo[c].made;
                             cost.text    = contentInfo[c].cost;
                             
                             if (positionBuckets) {
                             bucket       = new bucket_left();     
                             //Align Data
                             bucket.y = position;
                             bucket.x = 70;
                             brand.x = -50;
                             brand.y = -35;
                             country.x  = -45;
                             country.y  = -10; 
                             made.x = -45;
                             made.y = 5;
                             cost.x = 45;
                             cost.y = -10;
                             img.x = -105;
                             img.y = -35;
                             brandnameTxt.align = TextFormatAlign.LEFT;
                           priceTxt.align         = TextFormatAlign.LEFT;
                             positionBuckets    = false; 
                             } else {
                             bucket       = new bucket_right();     
                             //Align Data
                             bucket.y = position;
                             bucket.x = 240;
                             brand.x = -50;
                             brand.y = -35;
                             country.x  = -45;
                             country.y  = -10; 
                             made.x = -45;
                             made.y = 5;
                             cost.x = -110;
                             cost.y = -10;
                             img.x = 70;
                             img.y = -35;
                             brandnameTxt.align = TextFormatAlign.RIGHT;
                             positionBuckets    = true;      
                             }
                             brand.setTextFormat(brandnameTxt);
                             country.setTextFormat(detailsTxt);
                             made.setTextFormat(detailsTxt);
                             cost.setTextFormat(priceTxt);
                             //this.tweenBucket(bucket);
                             addChildAt(bucket, 0);
                             bucket.addChild(DisplayObject(img));
                             bucket.addChild(brand);
                             bucket.addChild(country);
                             bucket.addChild(made);
                             bucket.addChild(cost);
                             position += 70;
                   }
              }
              
              private function populateInfo(event:Event) {
                   
                   //Incoming XML Data
                   xmlContainer = new XML(event.target.data);
                   xmlList = xmlContainer.product;
                   //
                   
                   //Variables to hold the string
                   var brandTxt:String;
                   var country:String;
                   var material:String;
                   var price:String;
                   var image:String;
                   
                   for (var i:uint = 0; i < xmlList.length(); i++) {     
                   if (xmlList.country.text()[i] == "USA") {
                   brandTxt = xmlList.brand.text()[i];
                   country = "product of " + xmlList.country.text()[i];
                   material = "made of " + xmlList.material.text()[i];
                   price = "$" + xmlList.price.text()[i];
                   image = xmlList.image.text()[i];
                   rackUSA.name = brandTxt.toLowerCase();
                   var imgVar:* = this.populateImages(image, "http://localhost/rackets/" + image); 
                   rackUSA.push({brand: brandTxt, country: country, made: material, cost: price, pic: image, picture: imgVar});
                   //addChild(DisplayObject(rackUSA[0].picture));
                   } else if (xmlList.country.text()[i] == "Other") {
                   brandTxt = xmlList.brand.text()[i];
                   country = "product of " + xmlList.country.text()[i];
                   material = "made of " + xmlList.material.text()[i];
                   price = "$" + xmlList.price.text()[i];
                   image = xmlList.image.text()[i];
                   var imgVarOther:* = this.populateImages(image, "http://localhost/rackets/" + image); 
                   rackOther.push({brand: brandTxt, country: country, made: material, cost: price, pic: image, picture: imgVarOther});
                   }
                   }
                   //this.startApplication();
              }
              
              
              
              
              
         }
    }
    

    If I clip named firstScreen how to fill with data from the rackUSA of the table, using the presented functions iterateArray

    I tried in a movieClip

    CustomClass.iterateArray (rackUSA); but it does not work

    Any suggestions

    I want to clarify the use cases.

    1 load data into the document class

    2. display a welcome message

    3 allow users to navigate through the products.

    Q1: Do you mean by 'welcome message' a user interface that allows to start navigation?

    Q2: Products appears the same way. I mean, consider that product display will have a uniform provision?

    If the answer to Q2 is Yes, I would:

    1. create a class that features products. Call ProductDisplay

    2 transfer data (subset of XML related to a particular product - in your case, it may be an object in the position of the table) in an instance of ProductDisplay

    I would like you to consider the following.

    It is a good practice to do OBJECT oriented programming class as little as possible each. This means that a class must have a very focused functionality. For example, ProductClass you perform tasks related to laying on the presentation of the product. With this in mind, it is best to delegate, say, loading image to a separate category. Believe me, when you do – your life will be much easier if you do features as granular as possible even if sometimes it feels like an overdose.

    So here's the sketch of your classes. I wrote it just to illustrate the idea. I did not check the code during execution is definitely buggy.

    Read my comments below also.

    It is a class of product image that load the image:

    
    package
    {
         import flash.display.Loader;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.events.ProgressEvent;
         import flash.net.URLRequest;
    
         public class ProductImage extends Sprite
         {
              // image url
              private var _url:String;
              // loader
              private var _loader:Loader;
              public function ProductImage()
              {
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              }
    
              private function init(e:Event = null):void
              {
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   _loader = new Loader();
                   _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoad);
                   _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
                   _loader.load(new URLRequest(url));
              }
    
              private function onProgress(e:ProgressEvent):void
              {
                   // display progress if needed
              }
    
              private function onLoad(e:Event):void
              {
                   _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE);
                   _loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
                   addChild(_loader);
    
              }
    
              public function get url():String { return _url; }
    
              public function set url(value:String):void
              {
                   _url = value;
              }
    
         }
    
    }
    

    ProdustDisplay class. Note how the product class is instantiated

    
    package
    {
         import flash.display.Sprite;
         import flash.events.Event;
    
         public class ProductDisplay extends Sprite
         {
              // hold the metadata
              private var _metaData:Object;
              // an object that holds the image
              private var _imageDisplay:ProductImage;
              public function ProductDisplay()
              {
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              }
    
              private function init(e:Event = null):void
              {
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   // only if metadat is set - build interface
                   if (metaData) {
                        build();
                   }
    
              }
              // build interface
              private function build():void {
                   // place prduct image
                   _imageDisplay = new ProductImage();
                   _imageDisplay.url = metaData.image;
                   addChild(_imageDisplay);
                   // do the rest - like description, etc.
              }
              // function that accepts product metadata
              public function set metaData(metaObject:Object):void {
                   _metaData = metaObject;
              }
              // returns metadata
              public function get metaData():Object {
                   return _metaData;
    
              }
    
         }
    
    }
    

    Now in your document class, you can set an unlimited number of instances of ProductDisplay (as slides) and manipulate them. Again, this is just a sketch. Actual implementation of features and code will be somewhat different:

    var productDisplay:ProductDisplay = new ProductDisplay();
    productDisplay.metaData = rackUSA[2];
    
    

    Note: Your code has several inconsistencies - we need to go through them at another time. For now just digest these ideas. I understand that this will involve a refactoring on your part, but once you are done with it - things will fall in place fast.

  • [JDev12c, ADF] Changing the data in the database tables (not)

    Hallo,

    a form obtained from a datacontrol created from a VO based on a query can moidify data in the tables used?

    In general, change tables af:forms to press the button "validate"?

    Some explanation would be appreciated.

    Thank you

    F.

    A commit writes the changes made on the current transaction in the DB. To make changes to the current transaction, you need to change the underlying model. If you use adfbc, that means that you need to make changes to the entity objects. As 1000723 says, vo that does not rely on an EO cannot change the model layer because there's no EO.

    Timo

  • Pulling data from the SAP ERP system in ColdFusion

    Has anyone tried to extract data from the SAP ERP system in ColdFusion?
    Y at - it any documentation on how to do this?

    Any help and suggestions would be very appreciated.

    Thank you, Rob.

    You are right. I don't know Java and when I looked at JCo stuff, I got confused.
    Thnaks for recommend bTalk. I met with them soon.

  • How can I publish the data to the hash table using regulator netui?

    Could someone help me on how to display the data of the hash to netui in the controller.

    There are altogether 18 survey questions (each question will have a list of surveyquestionanwer)
    but I see only 14 issues of the investigation during the validation in the controller and also I see all the answers of the survey instead of the one that is selected on the jsp.

    Here is my sample code.
    setQuestionSurveyAnswers(Set<Entry<String, Collection<SurveyQuestionAnswer>>> surveyAnswers)
    
    Map<String, Collection<SurveyAnswer>> surveyQuestionAnswerList = new HashMap<String, Collection<SurveyAnswer>>();
    
    surveyQuestionAnswerList contains <questionId, List<SurveyQuestionAnswer>>
    
    ---------------------------------------------------------------------------------------------------------------
    <netui-data:repeater dataSource="pageFlow.surveyForm.surveyAnswers">
    <netui-data:repeaterItem>
       <netui:span value="${container.item.key}" />
         <netui:radioButtonGroup dataSource="container.item.key" orientation="horizontal"> // is anything wrong here?
              <netui-data:repeater dataSource="container.item.value">
                   <netui-data:repeaterItem>
                        <netui:radioButtonOption value="${container.item.answerText}">
                             <netui:label value="${container.item.answerText}" />
                        </netui:radioButtonOption>
                   </netui-data:repeaterItem>
              </netui-data:repeater>
         </netui:radioButtonGroup>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    ---------------------------------------------------------------------------------------------------------------
    data structure:
    ---------------------------------------------------------------------------------------------------------------
    questionId  answerId    answerText      surveyQuestionLabel
    ---------------------------------------------------------------------------------------------------------------
    1              1           Yes          Do you want to take the survey?  <SurveyQuestionAnswer>
    1              2           No           Do you want to take the survey?     <SurveyQuestionAnswer>
    2              1           Beginner     Your expertese Level?    <SurveyQuestionAnswer>
    2              2           Expert       Your expertese Level?    <SurveyQuestionAnswer>
    Appreciate your help.
    Thank you

    Hello
    It won't work, you bind the data of the hashmaps key, which does not work (you have a vo as the key)
    I believe that your structure should be something like

    [QuestionAnswer] where QuestionAnswer has the label of the Question as well as a map of string, the string (AnswerId v/s AnswerText) (this may be an implicit method that traverses all objects and creates a map of AnswerId, AnswerText) and a single field of selectedAnswer.

    Your outer loop will make a loop on QuestionAnswer and print the label of the Question and the inner loop will be the RadioButtonGroup, the data source must be the field of selectedAnswer (because you want to fill only) and the optionsDataSource is the AnswerId card, AnswerText

    concerning
    Deepak

  • How insert/DML data in the table when the data in the related table changes

    Hello guys!

    I came across a problem that I need to get fixed. Because I don't know how to start and get it resolved I wanted to ask you for your expertise.

    The scenario is as follows:

    I have a table 'a' in my 10g database and a view "ab" which combined table 'a' with 'b' table in a view. However, the 'b' table is a table in another schema Manager database. and accessible (read only right) via a database link.

    Now here it is: whenever the data changes in table "b", for example 2 new sets of data is inserted, I need to insert automatically the 2 values of these 2 sets of data in my table "a". Same procedure for update and delete in table "b".

    The action that inserts data into the table 'a' must be initialized in my database, I have limited access to the other. Can I somehow use a trigger my reviews of "ab" to insert data into the table "a"? Or is it possible to use the "change notification procedure database" using the view as the reference?

    Desperately need help and example of all suspicion/code greatly appreciated. I am very new to Oracle and not very fond of PL/SQL routines. So please be so kind as to give me more details.

    Thanks in advance - I hope you have any ideas how I can get this problem resolved.

    Sebastian

    >

    ... it does not, since the DDL operations are not permitted on the remote databases (ORA-02021). I can't create the trigger on a view either. :-(
    So what ways are left to insert data into the table 'a' when the related table changes?

    Please, help if you have an idea!

    Yes,
    You can't perform the DDL (create the trigger...) on remote databases as you can see...
    Try to create this trigger in the local database that will make DML (insert into...) on the remote database.

        CREATE OR REPLACE TRIGGER local_forward_pt_after_insert
         AFTER INSERT
             ON N2K_INV_PT
             FOR EACH ROW
    
         BEGIN
             -- Insert records into table "a"
             INSERT INTO TBL_PUNKTDATEN@remote_database_sid
              ( INT_NUMMER,
                STR_GEBIET
                 )
             VALUES
              ( :new.INT_INV_PT_NR,
                :new.GEBIET );
         END;
    

    Thank you

    Good luck

Maybe you are looking for

  • Can I restore iOS iOS 10 7 backup?

    I'm updating the phone to my mother from iOS7 to iOS10.  During the update, I got and error and the phone only displays the message "Connect to iTunes".  When I connect to iTunes it tells me that the device must be updated or restored.  The update al

  • All but gone - missing Notes 7

    I went to add a note to note App and only 7 were there. I had just used the previous night.  Said the local Notes Notes title at the top now - don't remember than before.  I got 100's of very important Notes and they are all gone. Any idea?

  • How can we determine the users of storage

    My HD shows OTHER than the main user of storage. Is there a way to determine what exactly is?

  • How can I share my files with my friends?

    How can I share my files with my friends?

  • HP Touchpad Wireless does not connect to the restaurant

    Periodically, a few restaurants and schools, I get "No internet connection" even though I am connected and I have an arrow green and friends are able to connect.  No idea why this is happening on my Touchpad?  Thank you.