Please help with the sql

Hi ALL,
Test_dpnt is a table.from this i want to find the total no.of applications
(ssc,ssa,ssb,ssd,map,maq,oet,oet)---total 8.
parent - 2(since oet is indepentdent)
children---4
independent-2
source_app is the parent applications
dpnt_app---child application of parent
source_app dpnt_app
ssc ssa
ssc ssb
ssc ssd
mad map
mad maq
oet oet
I want the output likethis
total parent child independent
8 2 4 2
How to write the sql for this

still unclear to me on how you will be able to get the output as
total parent child independent
8     2      4     2based on the sample data you have posted below:
app_srce app_dpnt app_dpnt-typ-c
43       190      R
43       191      R
150      200      R
150      201      R
300      300      Rdo you mean by the output should look something like this:
srce count dpnt count
2          1        
           1        
2          1
           1
1          1or that it needs to count all the rows for each of the 3 columns

Similar Messages

  • Please help with the sql logic

    The below is going to be a record set from for a view from the FROM CLAUSE
    1. Find component DOCUMENT where the document type = Square Metres (DOC.UOM_STD_ID = 'METR_MTR) If any components are found, retrieve the Document records for these components ONLY.
    2. Otherwise, if no components exist with a Document type = Square Metres, look for components with a Document type of Acres (DOC.UOM_STD_ID = 'ACRE'). If found, retrieve the Space Lease records for these components ONLY.
    3. Otherwise, if the Document does not have components with a type = Square Metres or Acres, look for components with the type of (DOC.UOM_STD_ID = 'PARK'). Then retrieve the departments associated with these parking components.
    For Space Lease records above, retrieve the associated Org ID (SPACE.SPORG).
    Return all departments where
    the associated Org Type (ORG.ORGCLASS) = 'NON'
    or the associated Org Type (ORG.ORGCLASS) = 'GD'
    Thank you

    maybe something like:
    SQL> select emp.empno, emp.ename, emp.deptno
      2    from emp,
      3         (select case when (select 1 from emp where deptno = 10 and rownum  = 1) = 1 then 1
      4                      when (select 2 from emp where deptno = 60 and rownum  = 1) = 2 then 2
      5                      else 3
      6                 end case_col
      7            from dual) d1
      8   where deptno = decode(d1.case_col,1,10,
      9                                     2,60,
    10                                     3,70);
         EMPNO ENAME          DEPTNO
          7839 KING               10
          7782 CLARK              10
          7934 MILLER             10
    SQL> in you code it will be something like:
    select ...
       from document t1,        
            (select case when (select 1 from document doc where DOC.UOM_STD_ID = 'METR_MTR' and rownum  = 1) = 1 then 1
                         when (select 1 from document doc where DOC.UOM_STD_ID = 'ACRE' and rownum  = 1) = 2 then 2
                         else 3
                    end case_col
               from dual) d1
    where t1.uom_std_id = decode(d1.case_col,1,'METR_MTR',
                                             2,'ACRE',
                                             3,'PARK',
                                               null);note: untested

  • Please Help with the sql below for hierarchies

    Hi all.
    I have a table named stg_org_hier whose data looks like this
    i would like to build the hierarchy from BU,AREA,REGION,DISTRICT,TERR
    There are data cyles in the data below
    stg_org has this data
    QTR_CD     HIER_LVL_CD CURR_RDT_ID     DISTRICT_RDT_ID
    2007Q4     AREA     E0F7B00000000     E0F7B00000000
    2007Q4     BU     E0F7B00000000     E0F7B00000000
    2007Q4     AREA     E0F7B40000088     E0F7B40000000
    2007Q4     REGION     N0F7B40400000     E0F7B40000000
    2007Q4     REGION     E0F7B40700000     E0F7B40000000
    2007Q4     AREA     E0F7B00000088     E0F7B00000000
    2007Q4     AREA     E0F7B40000000     E0F7B00000000
    2007Q4     DISTRICT     N0F6B40405C99     N0F7B40400000
    2007Q4     REGION     N0F7B40400088     N0F7B40400000
    2007Q4     DISTRICT     N0F7B40405M99     N0F7B40400000
    2007Q4     TERR     N0F1B40405201     N0F7B40405M99
    they would like to see the output in the below in the below form
    QTR_CD     HIER_LVL_CD CURR_RDT_ID     DISTRICT_RDT_ID
    2007Q4     BU     E0F7B00000000     E0F7B00000000
    2007Q4     AREA     E0F7B00000000     E0F7B00000000
    2007Q4     AREA     E0F7B00000088     E0F7B00000000
    2007Q4     AREA     E0F7B40000000     E0F7B00000000
    2007Q4     AREA     E0F7B40000088     E0F7B40000000
    2007Q4     REGION     E0F7B40700000     E0F7B40000000
    2007Q4     REGION     N0F7B40400000     E0F7B40000000
    2007Q4     DISTRICT     N0F6B40405C99     N0F7B40400000
    2007Q4     REGION     N0F7B40400088     N0F7B40400000
    2007Q4     DISTRICT     N0F7B40405M99     N0F7B40400000
    2007Q4     TERR     N0F1B40405201     N0F7B40405M99
    Here is the sql i have written :
    select curr_terr_rdt_id,district_rdt_id,hier_lvl_cd,level from STG_ORG_QTR_SF_HCHY
    connect by prior
    curr_terr_rdt_id=district_rdt_id

    qtr_cd,hier_lvl_cd,curr_rdt_id,  district_rdt_id
    2007Q4,BU,         E0F7B00000000,E0F7B00000000
    2007Q4,AREA,       E0F7B00000000,E0F7B00000000
    2007Q4,AREA,       E0F7B00000088,E0F7B00000000
    2007Q4,AREA,       E0F7B40000000,E0F7B00000000
    2007Q4,AREA,       E0F7B40000088,E0F7B40000000
    2007Q4,REGION,     E0F7B40700000,E0F7B40000000
    2007Q4,REGION,     N0F7B40400000,E0F7B40000000
    2007Q4,DISTRICT,   N0F6B40405C99,N0F7B40400000
    2007Q4,REGION,     N0F7B40400088,N0F7B40400000
    2007Q4,DISTRICT,   N0F7B40405M99,N0F7B40400000
    2007Q4,TERR,       N0F1B40405201,N0F7B40405M99Not having a database at hand right now is helpful this time ;)
    Indenting the data clearly shows that the hierarchy rules are being violated (cycles you are mentioning do not matter in this case):
    Each node must have a unique predecessor except the root having none (in your case data on lines 3 and 4 both point to lines 1 and 2)
    2007Q4,BU,         E0F7B00000000,E0F7B00000000
    2007Q4,AREA,       E0F7B00000000,E0F7B00000000
           2007Q4,AREA,       E0F7B00000088,E0F7B00000000
           2007Q4,AREA,       E0F7B40000000,E0F7B00000000
                  2007Q4,AREA,       E0F7B40000088,E0F7B40000000
                  2007Q4,REGION,     E0F7B40700000,E0F7B40000000
                  2007Q4,REGION,     N0F7B40400000,E0F7B40000000
                         2007Q4,DISTRICT,   N0F6B40405C99,N0F7B40400000
                         2007Q4,REGION,     N0F7B40400088,N0F7B40400000
                         2007Q4,DISTRICT,   N0F7B40405M99,N0F7B40400000
                                2007Q4,TERR,       N0F1B40405201,N0F7B40405M99Removing the first data line or changing it's curr_rdt_id will make hierarhical queries work (lines 1 and 2 would better not point to themself)
    Regards
    Etbin
    Message was edited by: Etbin
    user596003

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • Please help with an sql to show more than one records into single row for each student

    From the following data I would like to create an sql to get the information  as the following layout
    studentid,  firstTerm,  EnglishMark1,ScienceMark1,MathsMark1, Secondterm,EnglishMark2,ScienceMark2,MathsMark2,
    ThirdTerm,EnglishMark3,ScienceMark3,MathsMark3 // As single rows for each student
    Example
    1 First, 30,40,20,Sec,30,40,20,  simillarly next row for next row for another sudent. Please help to generate the sql for the same.
    Please help it would be very appreciate.
    With Thanks
    Pol
    polachan

    create table yourdata (studentid int, term varchar(10), section varchar(50), Mark int)
    insert into yourdata values
    (1,'First','Math',20),(1,'First','English',30),(1,'First','Science',40),
    (2,'First','Math',20),(2,'First','English',30),(2,'First','Science',40),
    (3,'First','Math',20),(3,'First','English',30),(3,'First','Science',40),
    (1,'Sec','Math',20),(1,'Sec','English',30),(1,'Sec','Science',40),
    (2,'Sec','Math',20),(2,'Sec','English',30),(2,'Sec','Science',40),
    (3,'Sec','Math',20),(3,'Sec','English',30),(3,'Sec','Science',40)
    Select studentid
    ,max(case when term='First' and section='English' Then Mark End) as EnglishMark1
    ,max(case when term='First' and section='Science' Then Mark End) as ScienceMark1
    ,max(case when term='First' and section='Math' Then Mark End) as MathMark1
    ,max(case when term='Sec' and section='English' Then Mark End) as EnglishMark2
    ,max(case when term='Sec' and section='Science' Then Mark End) as ScienceMark2
    ,max(case when term='Sec' and section='Math' Then Mark End) as MathMark2
    ,max(case when term='Third' and section='English' Then Mark End) as EnglishMark3
    ,max(case when term='Third' and section='Science' Then Mark End) as ScienceMark3
    ,max(case when term='Third' and section='Math' Then Mark End) as MathMark3
    From yourdata
    Group by studentid
    drop table yourdata

  • Please help with PL/SQL

    Hi All,
    This is driving me nuts but I can't see what I am doing wrong....
    I have a simple PL/SQL with :
    DECLARE
    xxx NUMBER;
    BEGIN
    FOR z in 1..htmldb_application.g_f02.count loop
    xxx:=htmldb_application.g_f02(z);
    select task_id into present_task from dm_process_steps where process_id=:P34_ID AND task_id = xxx;
    htp.p(xxx);
    IF htmldb_application.g_f02(z) = present_task THEN
    htp.p('PRESENT');
    ELSE
    htp.p('NOT PRESENT');
    END IF;
    END;
    The above fails with:
    ORA-01403: no data found
    However if I replace the marked xxx with the number then the code works fine.
    I do not understand the reason for this since I know that xxx has in fact a value and the select should be valid!
    Kindly asking for any help on this!
    Pawel.

    Scott,
    This will probably be a quite extended but I'll try to make it as clear as possible. I took a different approach to find the element which is causing the problem.
    I have 2 TABLES defined as:
    DM_PROCESS_STEPS
    ID Number
    PROCESS_ID Number
    TASK_ID Number
    TASK_ORDER Number
    DM_TASKS
    TASK_ID Number
    TASK_TITLE Varchar2
    ...and some more columns ...
    On the page I have a PL/SQL Region with:
    DHTML_SHUTTLE (
    pSQL_1=>'select "TASK_TITLE","TASK_ID" from "DM_TASKS"',
    pSQL_2=>'select t.task_title, p.task_id from dm_tasks t,dm_process_steps p where t.task_id = p.task_id and process_id = :P34_ID order by p.task_order',
    pID_1=>'1',
    pID_2=>'2',
    pSort1=>'N',
    pSort2=>'Y',
    pFixed1=>'Y',
    pHeight=>'300',
    pWidth=>'400',
    pImagePrefix=>v('WORKSPACE_IMAGES')
    NOTE: All above code comes from a working shuttle_sample code. The only things I modified were pSQL_1 and pSQL_2
    - In this case I want to have "All available tasks in the first list"
    - Since the syntax for pSQL_2 item must return two columns I wrote a joined queary so that I can see the Task_Title on the second list although this column doesn't directly come from DM_PROCESS_STEPS.
    I also have a After Submit Process which is fired upon pressing an apply button:
    DECLARE
    BEGIN
    -- Clean the Tasks from current Process --
    delete from dump where process_id = :P34_ID;
    -- Populate the Process with new list
    FOR z in 1..htmldb_application.g_f02.count loop
    INSERT INTO DUMP
    (ID,TASK_ID,PROCESS_ID,TASK_ORDER)
    VALUES (DM_PROCESS_STEPS_SEQ.nextval,htmldb_application.g_f02(z),:P34_ID,z);
    END LOOP;
    END;
    Now, the problem is with htmldb_application.g_f02(z) element. If understand correctly (please verify this!) the value of this element is whatever the pSQL_2 returns in the second column. In this case, htmldb_application.g_f02(z) returns the Task_Id.
    However, when I view the contents of the DM_PROCESS_STEPS table I can see that the first row (or rows) contain PROCESS_ID under TASK_ID column !!! This is were I am most confused as I cannot figure out were these htmldb_application.g_f02(z) come from !!!
    For example:
    1. I am trying to edit tasks for a process with process_id = 421:
    2. In my select list I have 3 tasks (who's task_id are 746,782 and 785)
    When executing the above update process I get the following results:
    ID TASK_ID PROCESS_ID TASK_ORDER
    1737 421 421 1
    1738 421 421 2
    1739 421 421 3
    1740 746 421 4
    1741 782 421 5
    1742 785 421 6
    If I am not mistaken the value of
    htmldb_application.g_f02(1) - should be the Task_Id of the first element on my select list
    htmldb_application.g_f02(2) - should be the Task_Id of the second element on my select list and so on....
    Why does htmldb_application.g_f02(1-3) hold a different value is beyond me !
    Questions which bother me:
    - Is there any way to lookup to 'contents' of htmldb_application.g_f02(1) from a separate SQL session or does it has to be in run-time?
    - Perhaps there is a way to flush or clean the htmldb_application.g_f02 ?
    Your help would be greatelly appriciated !
    Regards,
    Pawel.

  • Please help with the query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, BENEFICIARY_FIRST_NAME,
    BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE,
    LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL,
    ATTENDING_PROVIDER_NUMBER, BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI)
    VALUES
    (SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs,
    :REQUEST_METHOD_IDs, :SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs,
    :SERVICE_LOCATION_STATEs, :BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs,
    :HICNUMs, :CCNs, :CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs,
    :CONTRACTOR_IDs, :PRIORITY_IDs, :UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs,
    :ATTENDING_PROVIDER_NUMBERs, :BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs,
    :STUDY_IDs, :REFERRING_NPIs) RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    You cannot use (and do not want to in this case) the BULK COLLECT.
    create table for_testing
       the_id      number not null primary key,
       some_data   number
    declare
       l_return_value for_testing.the_id%type;
    begin
      4 
       insert into for_testing
          the_id,
          some_data
       values
          1,
          5
       returning the_id into l_return_value;
       dbms_output.put_line('the return values is ' || l_return_value);
    end;
    20  /
    the return values is 1
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?Is a simple example. In the future, please use the tags to preserve formatting on your code like i have so it remains readable .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help with the GUI quiz question!

    Hi Folks,
    Please help me with the code for the following GUI.
    The display window of the application should have two panels at the top level (you could have multiple panels contained within a top-level panel). The first top level panel should have a grid or a border layout and should include apart from various label objects: 1) a textfield to store the info entered, 2) a combobox 3) a combobox or a list box , 4) a radio-button group , 5) a combo box 6) checkboxes for additional accessories, and 7) checkboxes .
    The second top-level panel that is placed at the bottom of the window should have a submit button, a clear button and a textarea for output.
    Thanks a lot.

    Please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
    Please post a short, concise, executable example of what you're trying to do. This does not have to be the actual code you are using. Write a small example that demonstrates your intent, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
    Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
    Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
    If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
    Help us help you solve your problem.

  • Can anyone please help with the 2.3 update in UK?

    Can anyone please help?  I have an unbranded x10 in the UK.  PC companion constantly tells me my phone software is up to date (with android 2.1) so I cannot upgrade to 2.3.  I've tried all the tips on the SE support page like deleting the database content and looking for the setting to update the phone next time it's connected which doesn't exist (very informative SE!).  I'm not keen on this independent software installation through the rapidshare download, it seems full of glitches looking at the forums.  http://www.sonyericsson.com/update/?lc=en&cc=gb&pid=xperiax10  This link clearly tells us the update is available through PC companion, no joy for me though.  Any help is welcome.

    Have a look at this and check your version number see if its listed
    http://forum.xda-developers.com/showthread.php?t=1186045
    As for generic roms you have probable read about custom roms
    See this thread it is a stock SE rom not a custom rom and will give you just that a stock SE rom if you want
    http://talk.sonyericsson.com/thread/19762

  • Help with the sql

    Table 2 is a subset of table 1. All the accounts in table2 are in table 1. Now i want all the accounts in table 1 which are not in table 2. I wrote a sql something like below but ended up getting all the accounts, i know it's because of the left outer join. I need some idea someone please help. Thank you.
    select a.account from table 1 a
    left outer join
    ( select account from table 2) turr on turr.account <> a.ccount

    There are many ways to achieve that. Here are some ideas:
    SELECT account FROM TABLE_1
    MINUS
    SELECT account FROM TABLE_2
    SELECT account
    FROM   table_1
    WHERE  NOT EXISTS
           ( SELECT null
             FROM   table_2
             WHERE  table_2.account = table_1.account
    SELECT account
    FROM   table_1
    WHERE  account NOT IN (SELECT account FROM table_2)
    SELECT table_1.account
    FROM      table_1
    LEFT JOIN table_2 ON table_1.account = table_2.account
    WHERE  table_2.account IS NULL
    ;

  • Please help with the URL class

    Hello,
    I am trying to write a Java app that will take a url and download it.
    I believe you can do this with the URL class but I don't understand how to. For example, if the http url location points to a picture file, how would I code the app to retrieve this picture and save it to a specified directory?
    Also, is there a way that my java app could open another program, let's say Microsoft Internet Explorer?
    Please be as specific as possible, thanks!

    You'll see below an example to download a file
    private static String copyFile (String url, String nomFichier){
         // construction du fichier de sortie
         File outputFile = new File(repertoire + "\\fichiers\\" + nomFichier);
         // si le fichier existe d�j�, il ne sert � rien de le t�l�charger !
    if (outputFile.exists())
         return "fichiers/" + nomFichier;
              try {     
         HttpURLConnection connect = (HttpURLConnection)new URL(url).openConnection();
    boolean connected = false;
    while (!connected){
    try {
    connect.connect();
    connected = true;
         catch (java.io.IOException e1) { System.out.print("...Tentative de connection"); }     
    DataInputStream reader = new DataInputStream(
    connect.getInputStream());
         FileOutputStream out = new FileOutputStream(outputFile);
         int length = 1024;
         byte[] buf = new byte[length];
         int offset = 0;
         long offsetCourant = 0;
         int nb=0;
         while ((nb=reader.read(buf,offset,length))!= -1) {
              out.write(buf,0,nb);
         out.close();
         catch (java.net.MalformedURLException e) { System.out.println("pb d'url"); }
         catch (java.io.IOException e1) { System.out.println(e1.getMessage()); }
         return "fichiers/" + nomFichier;
    }

  • Please help with the versioncue problem.

    I know this is not the right place to post this but please, I need fast help. When I open a project in Photoshop CS3 it says "Cannot find the missing module blablabla versioncue.dll". I've searched around a little and found someone who said that 2 updates would fix it. I downloaded the updates but when I started to install it said "Can't find the product to update".
    For some extra info, I just reformated comp and I've considered it might be something about missing files or something and if so, can someone add [email protected] and send to me because this is important. This is also because I have a schoolproject where Photoshop will be needed.
    I'm also suspicious if I actually have the documents and settings files for CS3 since I only copied the whole files from programs when I reformated it.
    Please help!

    >since I only copied the whole files from programs when I reformated it.
    you need to do a full install from the original discs david. simply copying the files won't do it.

  • Please help with the understanding of aspect ratio!!!

    Hi all,
    I'm trying to get my head around the 'aspect ratio' thing if anyone can help.
    To give an example, I have imported footage in FCE and in the details of the file it states:
    Pixel Aspect: PAL - CCIR 601
    Frame size: 720 x 576
    What exactly can I earn from the above information?
    I gather this is not widescreen but I would like the end film to be. Do I have to 'crop' this? If so, how!?
    And how do I make sure the picture looks right on a widescreen TV (so the people don't look squashed, say)?
    Many thanks in advanced for the wisdom passed on!
    Adam
    Oh and should i be thinking about this before I'm about to import from a Mini DV cam? As in settings...
    Message was edited by: Vegas Superstar

    If you check the anamorphic box on a 4:3 clip you will see some kind of distortion.
    In general you choose your setup accordingly with the way your footage has been shot.
    In the article you found that iDVD doesn't recognize the "anamorphic" flag that your footage can have in FCE.
    Therefore your exported material must be "arranged" so that you tell iDVD you have a 16:9 movie.
    When you work entirely in anamorphic 16:9 in FCE (your footage was shot in 16:9 and have the anamorphic flag on), when you export the sequence using export to quick time movie, you'll get a 720x576 PAL movie. Because iDVD will not translate the anamorphic flag, you have to manually change the movie size to 1024x576 for PAL, so that your resultant movie will be keeping the 16:9 aspect ratio.
    The native widescreen doesn't use such flag and the video is already at 16:9 aspect ratio.
    That's has to deal with pixel that are rectangular and not square as computer uses.
    I guess someone else will be more specific and detailed on this.
    Regards,
    Armando.

  • Please help with the FOR loop and the array..

    I was trying to place some words in the Movie Clip
    "TextPanel" and set a
    random position to each of them.
    But it's not working.
    1) I created a Movie Clip "word" and inside that MC I created
    a text field
    and gave it an identifier "textFiled".
    2) The linkage name for Movie Clip "word" I set to "word".
    3) In the actionscript I created an Array called "aWords".
    4) Then I created a FOR loop that should
    place (attach) Movie Clips "word0", "word1", "word2" and
    "word3" to the
    movie clip TextPanel, and set the textField text for each of
    them to the
    text from the Array.
    But the script attaches 4 Movie Clips with a name
    "Undefined", instead of 4
    different names (from the Array).
    What is wrong with this script?
    var aWords:Array = [apple,banana,orange,mango];
    for(i=0;i<aWords.length;i++){
    var v = TextPanel.attachMovie("word","word"+i,i);
    v.textFiled.text = aWords
    v._x = randomNumber(0,Stage.width);
    v._y = randomNumber(0,Stage.height);
    Thanks in advance

    But in my Post I already wrote v.textFiled.text = aWords
    so I don't understand what were you correcting..
    And one more:
    I have tested it by changing the
    v.textFiled.text = aWords; to v.textFiled.text = "some
    word";
    and it's working fine.
    So there is something wrong with the Array element, and I
    don't know why..
    "aniebel" <[email protected]> wrote in
    message
    news:ft2d5k$lld$[email protected]..
    > Change:
    > v.textFiled.text = aWords;
    >
    > to:
    > v.textFiled.text = aWords
    >
    > It needs to know which element inside the array you want
    to place in the
    > textfield (or textfiled) :)
    >
    > If that doesn't work, double check that your instance
    name is correct
    > inside
    > of "word".
    >

  • Help with the SQL Query: How to use case.

    Q:- I have written a query which will written the following output.
    C1 C2 C3
    a ---- b.1 ---- 1
    a ---- b.1 ---- 1
    a ---- b.1 ---- 2
    a ---- b.1 ---- 3
    a ---- b.1 ---- 3
    a ---- b.2 ---- 1
    a ---- b.2 ---- 2
    a ---- b.2 ---- 2
    a ---- b.3 ---- 1
    ac---- b.1 ---- 1
    ac---- b.1 ---- 2
    ac---- b.2 ---- 1
    ac---- b.2 ---- 2
    ac---- b.2 ---- 3
    ac---- b.2 ---- 3
    ac---- b ---- 1
    But i want the output to print in the following way. Please suggest.
    C1 C2 C3
    a ---- b.1 ---- 1
    ------------------2
    ------------------3
    a ---- b.2 ---- 1
    ------------------2
    a ---- b.3 ---- 1
    ac---- b.1 ---- 1
    ------------------2
    ac---- b.2 ---- 1
    ------------------2
    ac---- b.2 ---- 3
    ac---- b ---- 1
    Edited by: user555994 on Jan 18, 2011 1:42 AM
    Edited by: user555994 on Jan 18, 2011 1:43 AM

    Or may be
    SQL> ed
    Wrote file afiedt.buf
      1  WITH sample_data AS
      2    (SELECT 'a' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
      3     SELECT 'a' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
      4     SELECT 'a' C1,'b.1' C2, 2 C3 FROM dual UNION ALL
      5     SELECT 'a' C1,'b.1' C2, 3 C3 FROM dual UNION ALL
      6     SELECT 'a' C1,'b.1' C2, 3 C3 FROM dual UNION ALL
      7     SELECT 'a' C1,'b.2' C2, 1 C3 FROM dual UNION ALL
      8     SELECT 'a' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
      9     SELECT 'a' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
    10     SELECT 'a' C1,'b.3' C2, 1 C3 FROM dual UNION ALL
    11     SELECT 'ac' C1,'b.1' C2, 1 C3 FROM dual UNION ALL
    12     SELECT 'ac' C1,'b.1' C2, 2 C3 FROM dual UNION ALL
    13     SELECT 'ac' C1,'b.2' C2, 1 C3 FROM dual UNION ALL
    14     SELECT 'ac' C1,'b.2' C2, 2 C3 FROM dual UNION ALL
    15     SELECT 'ac' C1,'b.2' C2, 3 C3 FROM dual UNION ALL
    16     SELECT 'ac' C1,'b.2' C2, 3 C3 FROM dual UNION ALL
    17     SELECT 'ac' C1,'b' C2, 1 C3 FROM dual
    18     )
    19  SELECT
    20         NVL2(LAG(C1) OVER (PARTITION BY C1,C2 ORDER BY C1,C2,C3),NULL,C1) C1
    21        ,NVL2(LAG(C2) OVER (PARTITION BY C1,C2 ORDER BY C1,C2,C3),NULL,C2) C2
    22        ,C3
    23* FROM (SELECT DISTINCT c1,c2,c3 FROM sample_data)
    SQL> /
    C1 C2          C3
    a  b.1          1
                    2
                    3
    a  b.2          1
                    2
    a  b.3          1
    ac b            1
    ac b.1          1
                    2
    ac b.2          1
                    2
    C1 C2          C3
                    3
    12 rows selected.
    SQL>

Maybe you are looking for

  • Seam on Weblogic 10.3.2: Possible classloader problem?

    Hi all, I have a problem deploying a Seam 2.2.0.GA application on WebLogic 10.3.2. I use JRockit 1.6.0_14, Richfaces 3.2.0.GA and Facelets 1.1.14 and the Server is deployed on Windoes XP 32bit. The application has the following structure: application

  • How to change the size of Bex Variable screen?.

    Hi Experts, Can we able to change the size/font of the Bex query variable screen?. I have a requirement where lot of variables used but query variable screen is not showing up all the variables including the 'execute,cancel, check' menu buttons. Is t

  • In Pricing Procedure PO is created the lowest  price has to  be picked

    Hi All, In Pricing procedure there is price for material in outline agreement, inforecod and material specific price, my client want when a PO is created the the lowest  price has to  be picked. Kindly let me know the process for the issue hope to he

  • Scheduling date Make to stock

    Hello, I have created this post because I have an issue regarding sheduling date for FG (finished good) and SFG (semi finished good) after MRP run. We are in Make to stock scenario (plannig strategy 40) Of couse, SFG is linked to FG in BOM. We use le

  • BI Integrated Planning: Cannot find a J2EE Engine

    Hi gurus, I want to run "Start Modeler" in BI Integrated Planning transaction, but I got a error called "Cannot find a J2EE Engine". Does anyone have any idea to deal with it? I will assign reward points for useful comments or answers, thanks in adva