help join you a table nested with ordinary table

IM creating a nested table object prtcnpt_info codelist. In a block anonymous im saying t_code as type nested table codelist.
Now when I try to join the table nested to ordinary table oracle DB and I get the error: PL/SQL: ORA-00904: "COLUMN_VALUE": invalid identifier.
Please help me on this and provide link tutorial about this concepts... Here is the code I wrote

-Start code.
create or replace type prtcnpt_info as an object (identification number
, name varchar2 (200)
(, code varchar2 (30));


create type codelist is the prtcnpt_info table;


declare
t_code codelist.
Start

Select prtcnpt_info (b.pid, b.name, pt.code) in bulk collect into t_code
party pt
mc_code b
where pt.cd in ("AAA", "BBB")
and pt.ptype_id = b.pt_type_id;


INSERT INTO table (ID
RUN_ID
DATA
P_ID
)
SELECT id
run_id
data
prtct.id-> 1
IN table_2 t2
, (by selecting column_value in table (t_code)) prtct
WHERE prtct.id = t2. P_ID; -> 2

end;

-End code;
also of the anonymous block
1 = > is this right until you get the id value (b.pid) of the tablet_code nested as prtct alias?
2 = > is this right until you reach the nested with ordinary table table? I want to join the id column in the tables.

Published by: 914912 on April 30, 2012 02:11

Write the insert like this and try

insert into table
(
       id
     , run_id
     , data
     , p_id
)
 select id,
     run_id,
     data,
     prtct.id
   from table_2 t2
     table(t_code) prtct
  where prtct.id = t2.p_id;

Tags: Database

Similar Questions

  • help the join of two tables

    Hello

    I need your help in the script below:

    I have two tables.

    My "table1" table contains the data below:

    Code:

    Name, Value
    ------------
    12 A, 1
    12 B, 1
    12 C, 1



    Table2 contains the following data:

    Code:

    value, result
    ------------
    1.12
    1.24
    1.56
    1 423
    1.32
    1, 3




    I need to join based on a field value.

    My result is:

    Code:


    NAME, VALUE, RESULT
    -------------------------
    12 A, 1, 12
    12 B, 1: 24
    12 C, 1, 56
    12d, 1, 423
    12TH, 1, 32
    12F, 1, 3





    Based on the number of records in the second table, it must add A to Z at the end of the name field. The number of records exceeds no more than 26. How can we achieve this?


    _________________

    Thank you
    Pocard

    OK, now you give other useful information - that there always will be combinations of amounts in table2 to match values in table1. (It is difficult to help when you say the specs one both :-))

    But it is not easy, because the code should really try to consider all combinations and then 'choose the right' - it's easy for us humans, but not easy to code in the programming logic.
    I made an attempt:

    SQL> set linesize 120
    SQL> with table1 as (
      2     select 'A1' name, 123 id, 150 value from dual union all
      3     select 'A2' name, 123 id, 200 value from dual union all
      4     select 'A3' name, 123 id, 300 value from dual
      5  ), table2 as (
      6     select 123 id, 100 value from dual union all
      7     select 123 id, 100 value from dual union all
      8     select 123 id, 50  value from dual union all
      9     select 123 id, 100 value from dual union all
     10     select 123 id, 100 value from dual union all
     11     select 123 id, 100 value from dual union all
     12     select 123 id, 100 value from dual
     13  )
     14  --
     15  -- End of test data
     16  --
     17  select
     18  t1.id, t1.name, t1.value, t2.value,
     19  t1.rn, t1.minval, t1.maxval,
     20  t2.rn, t2.sumval
     21  from (
     22     select
     23     tab1.*,
     24     nvl(sum(tab1.value) over (
     25        partition by tab1.id
     26        order by tab1.rn
     27        rows between unbounded preceding and 1 preceding
     28     ),0) minval,
     29     sum(tab1.value) over (
     30        partition by tab1.id
     31        order by tab1.rn
     32        rows between unbounded preceding and current row
     33     ) maxval
     34     from (
     35        select
     36        table1.*,
     37        row_number() over (
     38           partition by table1.id
     39           order by table1.value desc
     40        ) rn
     41        from table1
     42     ) tab1
     43  ) t1
     44  join (
     45     select
     46     tab2.*,
     47     sum(tab2.value) over (
     48        partition by tab2.id
     49        order by tab2.rn
     50     ) sumval
     51     from (
     52        select
     53        table2.*,
     54        row_number() over (
     55           partition by table2.id
     56           order by table2.value desc
     57        ) rn
     58        from table2
     59     ) tab2
     60  ) t2
     61  on (t2.id = t1.id)
     62  where t2.sumval > t1.minval
     63  and t2.sumval <= t1.maxval
     64  order by
     65  t1.id,
     66  t1.rn,
     67  t2.rn
     68  ;
    
            ID NA      VALUE      VALUE         RN     MINVAL     MAXVAL         RN     SUMVAL
    ---------- -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
           123 A3        300        100          1          0        300          1        100
           123 A3        300        100          1          0        300          2        200
           123 A3        300        100          1          0        300          3        300
           123 A2        200        100          2        300        500          4        400
           123 A2        200        100          2        300        500          5        500
           123 A1        150        100          3        500        650          6        600
           123 A1        150         50          3        500        650          7        650
    
    7 rows selected.
    

    It doesn't seem to work for your sample data, but it is much too simple a rule at work in general. My "rule" is simply of sorts data according to the value descending and adding up to what 'enough' of values have been added.

    Consider this example of data instead of this:

    SQL> with table1 as (
      2     select 'A1' name, 1 id, 100 value from dual union all
      3     select 'A2' name, 1 id, 200 value from dual union all
      4     select 'A3' name, 1 id, 300 value from dual union all
      5     select 'B1' name, 2 id, 100 value from dual union all
      6     select 'B2' name, 2 id, 200 value from dual
      7  ), table2 as (
      8     select 1 id, 25  value from dual union all
      9     select 1 id, 75  value from dual union all
     10     select 1 id, 50  value from dual union all
     11     select 1 id, 50  value from dual union all
     12     select 1 id, 175 value from dual union all
     13     select 1 id, 225 value from dual union all
     14     select 2 id, 25  value from dual union all
     15     select 2 id, 50  value from dual union all
     16     select 2 id, 75  value from dual union all
     17     select 2 id, 100 value from dual union all
     18     select 2 id, 50  value from dual
     19  )
     20  --
     21  -- End of test data
     22  --
     23  select
     24  t1.id, t1.name, t1.value, t2.value,
     25  t1.rn, t1.minval, t1.maxval,
     26  t2.rn, t2.sumval
     27  from (
     28     select
     29     tab1.*,
     30     nvl(sum(tab1.value) over (
     31        partition by tab1.id
     32        order by tab1.rn
     33        rows between unbounded preceding and 1 preceding
     34     ),0) minval,
     35     sum(tab1.value) over (
     36        partition by tab1.id
     37        order by tab1.rn
     38        rows between unbounded preceding and current row
     39     ) maxval
     40     from (
     41        select
     42        table1.*,
     43        row_number() over (
     44           partition by table1.id
     45           order by table1.value desc
     46        ) rn
     47        from table1
     48     ) tab1
     49  ) t1
     50  join (
     51     select
     52     tab2.*,
     53     sum(tab2.value) over (
     54        partition by tab2.id
     55        order by tab2.rn
     56     ) sumval
     57     from (
     58        select
     59        table2.*,
     60        row_number() over (
     61           partition by table2.id
     62           order by table2.value desc
     63        ) rn
     64        from table2
     65     ) tab2
     66  ) t2
     67  on (t2.id = t1.id)
     68  where t2.sumval > t1.minval
     69  and t2.sumval <= t1.maxval
     70  order by
     71  t1.id,
     72  t1.rn,
     73  t2.rn
     74  ;
    
            ID NA      VALUE      VALUE         RN     MINVAL     MAXVAL         RN     SUMVAL
    ---------- -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
             1 A3        300        225          1          0        300          1        225
             1 A2        200        175          2        300        500          2        400
             1 A2        200         75          2        300        500          3        475
             1 A1        100         50          3        500        600          4        525
             1 A1        100         50          3        500        600          5        575
             1 A1        100         25          3        500        600          6        600
             2 B2        200        100          1          0        200          1        100
             2 B2        200         75          1          0        200          2        175
             2 B1        100         50          2        200        300          3        225
             2 B1        100         50          2        200        300          4        275
             2 B1        100         25          2        200        300          5        300
    
    11 rows selected.
    

    In this data set simple ranking by value won't work - it should have been A3: (225,75), A2: (175,25) and A1: (50.50).

    I can't really think of a reasonably easy way to do this in SQL only. Maybe using the clause TYPE would be possible, but not negligible. It is possible, it would be easier to solve this problem in PL/SQL in iterating through a few tables and intelligently to try different combinations, rather than creating all combinations in a huge piece of brute force SQL.

    I'm sorry, Pandeesh, but I can't think a solution easily.
    I might be able to do something, if I fiddled with the problem for a few days, but that would be beyond the scope of this forum. It would be a consultation of employment rather than a little help from the forum :-)

  • problem with join of two tables

    Hi, consider the following data
    WITH data AS
    (
      SELECT 123 cid, 'aaa' isi, 'kkk' sud, 'ttt' ri FROM dual UNION ALL 
      SELECT 222 cid, 'bbb' isi, 'gggg' sud, 'hhh' ri FROM dual
    
    ) ,
    data2 AS 
    (
      SELECT 'aaa' isi, 'yyy' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'qqq' isi, 'ggg' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'uuu' isi, 'ppp' sud, 'ttt' ri FROM dual UNION ALL
       SELECT 'ppp' isi, 'mmm' sud, 'nnn' ri FROM dual 
    
    
    )
    what I want to do, is to join data2 with data by isi, ri or southern id table and produce this output.
     cid  txt
     ===  ====
     123  aaa
     222  ggg
     123  ttt
    It's how I got the above output:
    first try to join isi in database2 with isi in "features" and discover if line matches. If this is the case, display the cid of the data table and the use of the value to match.
    e.g. in the first line of table data2, we can see that isi = aaa matches line an isi data table. If the output displays 123 and value aaa.

    If the rank table two of the Data2 isi = qqq. When join them with the data table, we find not all isi with qqq. in this case, it must join with column of South. We can see that South = ggg data2 games
    the second line in the table of output so will bee 222 and value ggg.

    now, take a look at the third row in Database2. ISI = uuu is not found in the data table when join them. then try to join to the South. South = ttt is also not found in any row of the data table. so join with ri. We
    can see that ri = ttt data2 matches with ri = ttt in the table of data online 1. Therefore, we display the value.

    can someone help me write a sql query that joins these two tables by isi. If no line found then join South, if no found rows then join in ri? Thank you

    Hello

    elmasduro wrote:
    Hi Frank, data2.sud = 'Gay' (4 characters) assume to be South = "ggg". by mistake, I type extra g.

    I have another question about the request. What happens if I want to bring rows of data.2 even if they do not exist in the data table for the entire column was join?
    for example, I want to show this:

    cid  txt
    ===  ====
    123  aaa
    222  ggg
    123  ttt
    ppp  --row from data2
    

    the columns of the last row of data.2 does not match any column in the data table. in this case, I want to make but cid will be null. I tried outer join on your request, but it looks like I can not clause or with outer join

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
                                            ELSE  d2.ri
         END     AS txt
    FROM data     d1
    JOIN     data2     d2  ON     d1.is(+)i     = d2.isi
                  OR     d1.sud(+)     = d2.sud
                  OR     d1.ri(+)     = d2.ri
    ;
    

    How can I re - write the query for this case? Thanks again for your help

    Here is the outer join syntax:

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
              WHEN  d1.ri  = d2.ri   THEN  d2.ri
                                            ELSE  d2.isi
         END     AS txt
    FROM          data2     d2
    LEFT OUTER JOIN     data     d1  ON     d1.isi     = d2.isi
                           OR     d1.sud     = d2.sud
                           OR     d1.ri     = d2.ri
    ;
    

    The + sign for outer joins only works with the old join syntax, non-ANSI. Do not try to mix the two different ways to do joins.

    Not to mention that the outer join, don't forget to change the CASE expression, to include the new possibility of any columns 3 join matching.

  • Hello! I do a menu print of tarp for a round table, I did this from ms word since I have no idea where can we make a semicircle menu upside. My problem is that it has a very low resolution, please help me how to print possibly with 3' table

    Hello! I do a menu print of tarp for a round table, I did this from ms word since I have no idea where can we make a semicircle menu upside. My problem is that it has a very low resolution, please help me how to print possibly with 3' round table. Thank you

    Oh dear.  It turned into a terrible mess of a thread with opinions and advice.    You do your layout with Word.  In my experience, Word is a nightmare when it comes to positioning many areas of text and images.

    You shouldn't have changed the Word document in a JPG file, because the text all which perfectly progressive, which would be printed to "all" size without loss of image quality, then became an image file.  But if you "had" to make it a JPG, just about the worst possible way to do this is with the Snipping Tool, because the resulting image would have only the resolution of your computer screen.  Dows following?

    How big are the pictures you used in Word?  They probably didn't need to be very large, because each image is only an impression at a relatively small size.

    First thing to try is to open the Word Document and save in PDF format using the Standard option (after you select Save as PDF

    It will keep the text in the form of scalable vector objects which allows printing at any size.  However, I don't have the knowledge of how Word uses images.  I just did a little test, and while I could zoom in to see in the text, I'm not sure that the same is true of the images.  Depends on word refers to the image of the player, or he brings as an object of frame size, and I suspect it's the latter.  You need to do some research on it, because it might make you save a lot of time.

    You have Publisher?  Editor certainly reference the drive images, and friezer downsize to fit the page.  I suspect that you can import a Word into Publisher document, which would put you best part of the way with it.  I would like to test it, but I use it as a loyal user of Adobe InDesign.   If you are forced to restart, then editor or InDesign would be lot better, but it's doable with Photohop.  Just make sure that you start with enough pixels, which means 36 inches at 300 dpi or 10 000 square pixels.  When did save as PDF using the preset high quality printing, and ask your color printer (probably just use sRGB)

    Good luck

  • Bulk collect into a Table nested with Extend

    Hi all
    I want to get all the columns of the table emp and dept. So I use bulk collect into the concept of nested table.

    *) I wrote the function in three different ways. EX: 1 and 2 (DM_NESTTAB_BULKCOLLECT_1 & DM_NESTTAB_BULKCOLLECT_2) does not give the desired result.
    *) It only gives the columns of the EMP table. That means it takes DEPT & columns of the EMP table, but it only gives columns of table EMP.
    ) I think, there is something problem with nested table Extend.
    ) I want to know infested.
    Can we use bulk collect into a table nested with extend?
    If it is yes then fix the below codes (EX: 1 & EX: 2) and can you explain me please?


    Codes are given below *.

    CREATE OR REPLACE TYPE NEST_TAB IS TABLE OF THE VARCHAR2 (1000);

    EX: 1:
    ----
    -Bulk collect into a Table nested with Extend-
    CREATE or replace FUNCTION DM_NESTTAB_BULKCOLLECT_1
    RETURN NEST_TAB
    AS
    l_nesttab NEST_TAB: = NEST_TAB();
    BEGIN
    FOR tab_rec IN (SELECT table_name
    From user_tables
    WHERE table_name IN ('EMP', 'Department')) LOOP
    l_nesttab.extend;

    SELECT column_name
    bulk collect INTO l_nesttab
    Of user_tab_columns
    WHERE table_name = tab_rec.table_name
    ORDER BY column_id;
    END LOOP;

    RETURN l_nesttab;
    EXCEPTION
    WHILE OTHERS THEN
    LIFT;
    END DM_NESTTAB_BULKCOLLECT_1;

    SELECT *.
    TABLE (DM_NESTTAB_BULKCOLLECT_1);

    OUTPUT:
    -------
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO

    * Only the EMP table columns are there in the nested table.
    -----------------------------------------------------------------------------------------------------

    EX: 2:
    -----
    -Bulk collect in the nested with Extend based on County - Table
    CREATE or replace FUNCTION DM_NESTTAB_BULKCOLLECT_2
    RETURN NEST_TAB
    AS
    l_nesttab NEST_TAB: = NEST_TAB();
    v_col_cnt NUMBER;
    BEGIN
    FOR tab_rec IN (SELECT table_name
    From user_tables
    WHERE table_name IN ('EMP', 'Department')) LOOP
    SELECT MAX (column_id)
    IN v_col_cnt
    Of user_tab_columns
    WHERE table_name = tab_rec.table_name;

    l_nesttab. Extend (v_col_cnt);

    SELECT column_name
    bulk collect INTO l_nesttab
    Of user_tab_columns
    WHERE table_name = tab_rec.table_name
    ORDER BY column_id;
    END LOOP;

    RETURN l_nesttab;
    EXCEPTION
    WHILE OTHERS THEN
    LIFT;
    END DM_NESTTAB_BULKCOLLECT_2;

    SELECT *.
    TABLE (DM_NESTTAB_BULKCOLLECT_2);

    OUTPUT:
    -------
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO

    * Only the EMP table columns are there in the nested table.
    -------------------------------------------------------------------------------------------

    EX: 3:
    -----

    -Collect in bulk in a nested Table to expand aid for loop.
    CREATE or replace FUNCTION DM_NESTTAB_BULKCOLLECT_3
    RETURN NEST_TAB
    AS
    l_nesttab NEST_TAB: = NEST_TAB();
    TYPE local_nest_tab
    THE VARCHAR2 ARRAY (1000);
    l_localnesttab LOCAL_NEST_TAB: = LOCAL_NEST_TAB();
    NUMBER x: = 1;
    BEGIN
    FOR tab_rec IN (SELECT table_name
    From user_tables
    WHERE table_name IN ('EMP', 'Department')) LOOP
    SELECT column_name
    bulk collect INTO l_localnesttab
    Of user_tab_columns
    WHERE table_name = tab_rec.table_name
    ORDER BY column_id;

    BECAUSE me IN 1.l_localnesttab. COUNTING LOOP
    l_nesttab.extend;

    L_NESTTAB (x): = L_LOCALNESTTAB (i);

    x: = x + 1;
    END LOOP;
    END LOOP;

    RETURN l_nesttab;
    EXCEPTION
    WHILE OTHERS THEN
    LIFT;
    END DM_NESTTAB_BULKCOLLECT_3;

    SELECT *.
    TABLE (DM_NESTTAB_BULKCOLLECT_3);

    OUTPUT:
    ------
    DEPTNO
    DNAME
    LOC
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO

    * Now, I got the desired result set. DEP. and columns of the Emp Table are in the nested Table.




    Thank you
    Ann

    COLLECTION BULK cannot add values to an existing collection. It can only crush.

  • How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC

    The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.

  • I just wanted to know at all, if you encounter a problem with the update of creative cloud as if I was (error 1001), I discovered that my Webroot AntiVirus has been the origin of the problem. I turned it off and it updated correctly. Hope that helps some

    I just wanted to know at all, if you encounter a problem with the update of creative cloud as if I was (error 1001), I discovered that my Webroot AntiVirus has been the origin of the problem. I turned it off and it updated correctly. Hope that helps some people I've seen so angry about it here by searching for the answer myself.

    Thanks for sharing this, yes turning Firewall works.

    Concerning

    Stéphane

  • How to optimize the query with a join of virtual tables

    I'm working on a query that is get the data of virtual tables 2 and b
    one is formed by the Union, all say 4 queries and b is formed by the Union, all say 3 queries
    then these two virtual tables and b are joined on a column common and data are extracted from their part.
    Problem is that there is about 1 minutes each in the two virtual tables has and b. If individual a and b queries virtual takes about 5 seconds to retrieve data
    but the join on column takes about 25 seconds to retrieve data.
    Can someone guide me how to optimize the recovery of joining 2 virtual tables having large data

    Thank you

    Please read these:

    When your query takes too long
    When your query takes too long...

    How to post a SQL tuning request
    HOW to: Validate a query of SQL statement tuning - model showing

  • Extract xml nested with attributes using plsql

    Hi, I need to extract xml file and insert 2 oracle tables. The xml file is the use of attributes, and I cannot retrieve the element 'code' nested with its attributes in the context of its parent folder "table." Here is a sample of the xml data that I have to extract the date:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < dataset - cv:dataset - cv dateProduced = "2011-09-19 11:50:45 ' xmlns:dataset - cv ="http://www.myurl.com/dataset-cv/1.0.0">"
    < lov >
    < id of the table = "00000000000001000" Name = "Role of the system" isSystem = "true" status = "Enabled" >
    < id code = "00000000000000306" Name = "Helpdesk" code = "1" status = "Enabled" / >
    < id code = "000000000000000307" Name = "Reviewer" code = "2" status = "Enabled" / >
    < id code = "00000000000000308" Name = 'Administrator' code = '3' status = "Enabled" / >
    < /table >
    < id of the table = "00000000000002000" Name = 'Country' sSystem 'false' status = "Enabled" = >
    < id code = "000000000000002004" Name = "AFGHANISTAN" code = "4" status = "Enabled" / >
    < id code = "000000000000002008" Name = 'ALBANIA' code = '8' status = "Enabled" / >
    < id code = "000000000000002010" Name = "ANTARCTICA" code = "10" status = "Enabled" / >
    < /table >
    < / lov >
    < / dataset - cv:dataset - cv >


    I use a query like this that seems to work to get all the attributes of table or all attributes of code element element, but not the code attributes in the context of his record from the table parent.

    SELECT id
    englishname
    status
    FROM XMLTABLE ('for $i //lov//table return $i"
    FROM db_get_xml_from_file (p_file_name, p_directory)
    ID VARCHAR2 COLUMNS (32) PATH '@id '.
    , englishname PATH VARCHAR2 (50) '@englishName '.
    , status VARCHAR2 (10) PATH '@status '.
    )

    Any help will be much appreciated

    Thank you

    Dave

    user12036327 wrote:
    I use a query like this that seems to work to get all the attributes of table or all attributes of code element element, but not the code attributes in the context of his record from the table parent.

    To get the nested data, that you need to implement nested xmltable statements. for example

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
      3    
      4      
      5        
      6        
      7        
      8      
    9 10 11 12 13
    14
    15
    ') as xml from dual) 16 -- 17 -- end of sample data 18 -- 19 select tbl.id tbl_id 20 ,tbl.englishname as tbl_englishname 21 ,tbl.issystem as tbl_issystem 22 ,tbl.status as tbl_status 23 ,cd.id as cd_id 24 ,cd.englishname as cd_englishname 25 ,cd.code as cd_code 26 ,cd.status as cd_status 27 from t 28 ,xmltable(xmlnamespaces('http://www.myurl.com/dataset-cv/1.0.0' as "dataset-cv"), 29 '/dataset-cv:dataset-cv/lov/table' 30 passing t.xml 31 columns id varchar2(32) path '/table/@id' 32 ,englishname varchar2(20) path '/table/@englishName' 33 ,issystem varchar2(5) path '/table/@isSystem' 34 ,status varchar2(10) path '/table/@status' 35 ,code xmltype path '.' 36 ) tbl 37 ,xmltable(xmlnamespaces('http://www.myurl.com/dataset-cv/1.0.0' as "dataset-cv"), 38 '/table/code' 39 passing tbl.code 40 columns id varchar2(32) path '/code/@id' 41 ,englishname varchar2(20) path '/code/@englishName' 42 ,code number path '/code/@code' 43 ,status varchar2(10) path '/code/@status' 44* ) cd SQL> / TBL_ID TBL_ENGLISHNAME TBL_I TBL_STATUS CD_ID CD_ENGLISHNAME CD_CODE CD_STATUS -------------------------------- -------------------- ----- ---------- -------------------------------- -------------------- ---------- ---------- 00000000000001000 System Role true Enabled 00000000000000306 Helpdesk 1 Enabled 00000000000001000 System Role true Enabled 000000000000000307 Reviewer 2 Enabled 00000000000001000 System Role true Enabled 00000000000000308 Administrator 3 Enabled 00000000000002000 Country false Enabled 000000000000002004 AFGHANISTAN 4 Enabled 00000000000002000 Country false Enabled 000000000000002008 ALBANIA 8 Enabled 00000000000002000 Country false Enabled 000000000000002010 ANTARCTICA 10 Enabled 6 rows selected.
  • How it warns Oracle to use an index for the join of two tables...

    How to prevent the Oracle to use an index for the join of two tables to get a view online that is used in an update statement?

    O.K. I think I should explain what I mean:

    When you join two tables that have many entries sometimes there're better is not to use an index on the column that is used as a criterion to join.

    I have two tables: table A and table B.

    Table A has 4,000,000 entries and table B has 700,000 entries.

    I have a join of two tables with a numeric column as join criteria.

    There is an index on this column in A table.

    So I instead of
      where (A.col = B.col)
    I want to use
      where (A.col+0 = B.col)
    in order to avoid Oracle using the index.

    When I use the join in a select query, it works.

    But when I use the join as inline in an update statement I get the error ORA-01779.

    When I remove the '+ 0' the update statement works. (The column is unique in table B).

    Any ideas why this happens?

    Thank you very much in advance for any help.

    Hartmut cordially

    You plan to use a NO_INDEX hint as shown here: http://www.psoug.org/reference/hints.html

  • try to join vista 64 bit Busines with w2k3 Server domain

    try to join vista Business 64-bit with w2k3 Server domain after that I use/computer/attached properties to a domain, the connection is up, I used the administrator and the password of the domain error appears:
    The following error occurred attempt of joining to the domain "PA10:
    The specified server cannot perform the requested operation.

    He has worked on 3 of my xp pro version only on my vista can't go the same problem on my case mandriva samba samba share find vista Server it list all other sysdems in my network research all the ports are open in my firewall for samba (UDP 137/138 TCP 139/445

    Hello

    Your question of Windows Vista is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question here: http://social.technet.microsoft.com/Forums/en-US/category/windowsserver

    Diana
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Best approach to join several statistical tables in one

    I read different approaches to join several statistical tables in one, they all have a column 'productobjectid '.

    I want to get all the data for each product and put it in excel, then output a jpg cfchart with statistics.

    How would you do that, the part of sql?

    Thank you.

    Your "abiguous" is caused when you reference multiple tables in your SQL query that have the same field name.

    for example

    TableA a field 'ID '.

    TableB also has a field named "ID".

    If your select statement was:

    SELECT *.

    OF inner join TableA TableB on TableA.myField = TableB.myField

    WHERE ID = 4

    then SQL would be panic because he doesn't know which field ID in which table you are trying to access.  Your best bet is always prefix your domain names with the name of your table (or an alias - alias are very useful if you have long table names) when you do a Select statement.

  • Join PLSQL does not work with the RAW fields

    Hi all, I want to do a join between two tables that have a GUID (16 RAW) field as the primary key. To do this I create a cursor and the sql is simple. However, it will return the following error when I try to compile the procedure:

    Error (41.3): PL/SQL: statement ignored
    Error (42.27): PL/SQL: ORA-06552: PL/SQL: ORA-06553 finished Compilation unit analysis: PLS-320: the declaration of the type of the expression is incomplete or incorrect

    The tables and the slider are listed below. I would like to know the best way to do a join with Raw fields in plsql once the same query works when used outside of the procedure.

    Areas of CURSOR IS
    Select ha.partial, ha.acidental_burn, ha.edge_cut
    of harvest_area ha, harvest_order ho
    where ha. "" COMMAND "= ho. "" ID ";

    create table ("HARVEST_AREA"
    'ID' RAW (16) not null,
    "VERSION" NUMBER (10,0) not null,
    "ACCIDENTAL_BURN" NUMBER (1.0) not null,
    'SPACE' not null, DOUBLE PRECISION
    "EDGE_CUT" NUMBER (1.0) not null,
    "K_FACTOR" NUMBER (1.0) not null,
    Not null, 'PARTIAL' NUMBER (1.0)
    "SISCONAGR_CONTROL" NUMBER (1.0) not null,
    'CUT' RAW (16) not null,
    'ORDER' RAW (16) not null,
    'PROVIDER' RAW (16) not null,
    MDSYS "SHAPE". SDO_GEOMETRY,
    primary key ('ID')
    );

    create table ("HARVEST_ORDER"
    'ID' RAW (16) not null,
    "VERSION" NUMBER (10,0) not null,
    Not null, 'AXES' NUMBER (1.0)
    'CODE' NUMBER (10,0) not null,
    NVARCHAR2 (256) "FILE."
    "LOAD_DISTRIBUTION" NUMBER (1.0) not null,
    "RAW_CANE" NUMBER (1.0) not null,
    TIMESTAMP (4) 'TIMESTAMP' not null,
    'FACTORY' RAW (16) not null,
    RAW (16) 'BEFORE' not null,
    RAW (16) 'MODE' not null,
    MDSYS "SHAPE". SDO_GEOMETRY,
    primary key ('ID')
    );

    OK, I could reproduce on my 10.2.0.4 (my first test was on 11.2.0.1):

    SQL> create table harvest_area
    (
       id                raw (16) not null,
       version           number (10, 0) not null,
       accidental_burn   number (1, 0) not null,
       area              double precision not null,
       edge_cut          number (1, 0) not null,
       k_factor          number (1, 0) not null,
       partial           number (1, 0) not null,
       sisconagr_control number (1, 0) not null,
       cut               raw (16) not null,
       order1            raw (16) not null,
       provider          raw (16) not null,
       primary key (id)
    )
    /
    Table created.
    
    SQL> create table harvest_order
    (
       id                raw (16) not null,
       version           number (10, 0) not null,
       chopped           number (1, 0) not null,
       code              number (10, 0) not null,
       file1             nvarchar2 (256),
       load_distribution number (1, 0) not null,
       raw_cane          number (1, 0) not null,
       timestamp         timestamp (4) not null,
       factory           raw (16) not null,
       front             raw (16) not null,
       mode1             raw (16) not null,
       primary key (id)
    )
    /
    Table created.
    
    SQL> declare
       cursor areas
       is
          select null
          from harvest_area ha,
               harvest_order ho
          where ha.order1 = ho.id;
    begin
       for c in areas
       loop
          null;
       end loop;
    end;
    /
    Error at line 41
    ORA-06550: line 6, column 12:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 4, column 7:
    PL/SQL: SQL Statement ignored
    

    Problem is the harvest_order timestamp column that I think you need to rename:

    SQL> drop table harvest_area
    /
    Table dropped.
    
    SQL> drop table harvest_order
    /
    Table dropped.
    
    SQL> create table harvest_area
    (
       id                raw (16) not null,
       version           number (10, 0) not null,
       accidental_burn   number (1, 0) not null,
       area              double precision not null,
       edge_cut          number (1, 0) not null,
       k_factor          number (1, 0) not null,
       partial           number (1, 0) not null,
       sisconagr_control number (1, 0) not null,
       cut               raw (16) not null,
       order1            raw (16) not null,
       provider          raw (16) not null,
       primary key (id)
    )
    /
    Table created.
    
    SQL> create table harvest_order
    (
       id                raw (16) not null,
       version           number (10, 0) not null,
       chopped           number (1, 0) not null,
       code              number (10, 0) not null,
       file1             nvarchar2 (256),
       load_distribution number (1, 0) not null,
       raw_cane          number (1, 0) not null,
       timestamp1        timestamp (4) not null,
       factory           raw (16) not null,
       front             raw (16) not null,
       mode1             raw (16) not null,
       primary key (id)
    )
    /
    Table created.
    
    SQL> declare
       cursor areas
       is
          select null
          from harvest_area ha,
               harvest_order ho
          where ha.order1 = ho.id;
    begin
       for c in areas
       loop
          null;
       end loop;
    end;
    /
    PL/SQL procedure successfully completed.
    
  • repeater nested with custom component problem

    Hello
    I'm really stuck with this problem and no help from you guys is greatly appreciated.
    For starters, I have a simple external nested xml file for the data: "book.xml".
    <? XML version = "1.0" encoding = "UTF-8"? >
    < book >
    < section >
    S1 < sectionnumber > < / sectionnumber >
    < chapter >
    C1 < chapternumber > < / chapternumber >
    < / section >
    < chapter >
    C2 < chapternumber > < / chapternumber >
    < / section >
    < / section >
    < section >
    s2 < sectionnumber > < / sectionnumber >
    < chapter >
    < chapternumber > c3 < / chapternumber >
    < / section >
    < / section >
    < / book >

    I also have a main app (NestedRepeater.mxml) of a control relay that contains a custom (Section.mxml) mxml component:
    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml " xmlns:comps ="rate"layout ="absolute">
    < mx:XML id = "data" source = "" data / book.xml "/ >"
    < mx:VBox >
    < mx:Repeater id = dataProvider = "{data.section"Repeater1"}" >
    < sectionNumber = "{Repeater1.currentItem.sectionnumber comps: Section}" / > "
    < / mx:Repeater >
    < / mx:VBox >
    < / mx:Application >

    And in my component (Section.mxml) custom, I have another relay that want it for the chapter in each section as a < mx: state > for the user to be able to show/hide the chapters in each section.

    <? XML version = "1.0" encoding = "utf-8"? >
    "< mx:Canvas xmlns:mx = ' http://www.adobe.com/2006/mxml" > "
    < mx:Script >
    <! [CDATA]
    [Bindable]
    public var sectionNumber:String;
    []] >
    < / mx:Script >
    "" < mx:XML id = 'data' source = '... / data / book.xml "/ >
    < mx:VBox >
    < mx:Panel id = "panel1" layout = "absolute" title = "Section" >
    < mx:VBox >
    < mx:Label text = "{this.sectionNumber}" / >
    < mx:Button id = "btnArticles" label = "show chapters" click = "this.currentState = 'Chapter'" / >
    < / mx:VBox >
    < / mx:Panel >
    < / mx:VBox >
    < mx: states >
    < name mx: State = 'Chapter' >
    < mx:AddChild relativeTo = "{panel1}" position = "after" >
    < mx:VBox >
    < mx:Repeater id = dataProvider = "{data.section.chapter"Repeater2"}" >
    < mx:Panel layout = "absolute" title = "Chapter" >
    < mx:Label text = "{Repeater2.currentItem.chapternumber}" / > "
    < / mx:Panel >
    < / mx:Repeater >
    < / mx:VBox >
    < / mx:AddChild >
    < / mx: State >
    < / mx: states >
    < / mx:Canvas >

    So the problem I have is the relationship of each chapter to its parent section, when I run the application, the result is:
    S1
    C1
    C2
    C3
    S2
    C1
    C2
    C3

    The correct output I want based on the xml, the data provider must be and don't have not all the chapters in each section:
    S1
    C1
    C2
    S2
    C3

    If anyone has any suggestion, would be appreciated greatl.
    Thank you

    Yes, do not try to get new data into the component, simply pass the crux of the entire section in the custom component:

    In this component has a public property or a setter function:
    [Bindable]
    public var xmlSection:XML;

    This variable will now have this in it:


    S1

    C1


    C2

    Repeater2 is therefore:





    Very simple, you follow? I do it very often. Repeater, XML and custom components are an impressive combination.

    Tracy

  • My hard drive and the Extras have plenty of space. Yet several times each and every day, I'm getting flashed "virtual memory minimum insufficient..." Virtual memory pagefile... "Any joy? Please help if you can. Thank you. Cecilia.

    Question

    I have another type of problem with Firefox

    Description

    My hard drive and the Extras have plenty of space. Yet several times each and every day, I'm getting flashed "virtual memory minimum insufficient..." Virtual memory pagefile... "Any joy? Please help if you can. Thank you. Cecilia.

    This has happened

    Each time Firefox opened

    Only a few weeks ago, (tried everything)

    Troubleshooting information

    ?

    Version of Firefox

    3.6.3

    Operating system

    Windows XP

    User Agent

    Mozilla/5.0 (Windows; U; Windows NT 5.1; en - us; RV:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

    Plugins installed

    • -Adobe PDF plugin for Firefox and Netscape
    • Default plugin
    • Shockwave Flash 10.0 r45
    • Windows Presentation Foundation (WPF) plugin for Mozilla browsers
    • Java plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    • Npdsplay dll
    • DRM Netscape Plugin store
    • DRM Netscape Object network

    Read about virtual memory here: http://www.ehow.com/windows-xp-virtual-memory/

Maybe you are looking for

  • Yellow triangle with exclamation point after the transition of FCPX in motion

    Not finding what I'm doing wrong. Once I edited the 'Circle' of FCPX transition in motion, then saving them in the blue circle, but when I use it, I get this error of brand triangle yellow/exclation and the transition does not. Any ideas?

  • the dialog boxes that appear, become a real problem

    Recently, on my computer dialog boxes have become a real threat, I can't open a program, a google or a change, a channel without one popping up and stops me to open his makes me stupid, how can I prevent that from happening.

  • Key question product!

    I bought an original package of Windows 7 Ultimate and formatted my pc that several times but the last, I've said that my product key is incorrect, and he gave me options to choose. My question is why it has not agreed to this I called the automated

  • BlackBerry software delete calendar and Contacts from device to computer different link

    If lightning struck my laptop and I had to buy another. Installed the link and tried a sync Outlook calendar just to test and synchronize properly, but then I realized Link uses the name of the computer, which is diffferent, and created another calen

  • UCS Auto-deploiement of the configuration using PXE and double vNIC

    We are trying to set up Auto deploy blades UCS B200 M3.  Our facility has the chassis connected to double 6248 fabric interconnects.  We managed to get this to work when the blades have been identified by the MAC configured on the DHCP (Infoblox) ser