#OWNER # in FROM clause

I currently use APEX 4.2 to create traditional and interactive reports. I noticed that in the FROM clause

generated by the wizard #OWNER # is included in addition to the explicitly specified table in the

creating reports. Why is this it is included? Is it necessary? The application seems to work even when I

manually delete #OWNER # in the list.

I found a few discussions that suggest that this is potentially a security problem and that it is better

convenient to use only the tables in the FROM clause. Is this true?

Thank you.

Hello

You can remove it from the query, it will not make a real difference. It is very likely that in a future version of the TOP wizards add it more.

Concerning

Patrick

Member of the APEX development team

My Blog: http://www.inside-oracle-apex.com

APEX Plug-Ins: http://apex.oracle.com/plugins

Twitter: http://www.twitter.com/patrickwolf

Tags: Database

Similar Questions

  • A subquery in the From Clause

    How can I model the RPD with the sub query that has the subquery in the from Clause.

    SELECT

    o948938. CONSOLIDATED_NAME,

    (SUM (o948992. YTD_COMPLETED)) / (SUM (TOTAL_OCC_AP)) AS C_1,.

    SUM (TOTAL_OCC_AP) AS TOTAL_OCC_AP,

    Of

    ORG_DIM o948938,

    TIME_MONTHLY_DIM o948963,

    INSPECTION_FACT o948992,

    (SELECT TDS_NUM,

    MONTH_ID,

    SUM (TOTAL_APTS) TOTAL_AP,

    OF SUMMARY_FACT

    TDS_NUM GROUP,

    MONTH_ID

    ) O949126

    WHERE (o949126. MONTH_ID = o948992. MONTH_ID (+)

    AND o949126. TDS_NUM = o948992. TDS_NUM (+)

    AND (o948938. TDS_NUM = o949126. TDS_NUM)

    AND (O948963. MONTH_ID = O949126. MONTH_ID))

    Group

    O948938. NEW_BOROUGH_GROUPING

    Hello

    You can do this via an opaque view.

    You can also do this by modeling the cumulative value as a calculation LOGIC in the group by aggregation "pinned" to a specific dimension hierarchy that reflects consolidation in the online posting.

    Hope this helps,

    Robert.

  • Results of the query variant with unused table in the from clause

    Hi all

    I (processing_table2) table specified in the FROM clause in the SQL query , but I have not used any of its value in the SQL statement , but it still affects the results of the query. Please help me out here I'm naïve.

    This is the provided query

    SELECT SUM((CREV.sadc_extd*CSSP.redit_pcnt)/100)

    OF crev revenue_lines,.
    cssp sales_split,
    processing_table2
    WHERE crev.order_num = '7631090072'

    Results of the above query : 344028065018.359



    SELECT

    Sum((CREV.sadc_extd*CSSP.redit_pcnt)/100)

    OF crev revenue_lines,.
    sales_split PCSS

    WHERE crev.order_num = '7631090072'

    Results of the above query : 26463697309.1046


    Someone here suggest me pls!

    924804 wrote:
    Hi all

    I (processing_table2) table specified in the FROM clause in the SQL query , but I have not used any of its value in the SQL statement , but it still affects the results of the query. Please help me out here I'm naïve.

    This is the provided query

    SELECT SUM((CREV.sadc_extd*CSSP.redit_pcnt)/100)

    OF crev revenue_lines,.
    cssp sales_split,
    processing_table2
    WHERE crev.order_num = '7631090072'

    Results of the above query : 344028065018.359

    SELECT

    Sum((CREV.sadc_extd*CSSP.redit_pcnt)/100)

    OF crev revenue_lines,.
    sales_split PCSS

    WHERE crev.order_num = '7631090072'

    Results of the above query : 26463697309.1046

    Someone here suggest me pls!

    CARTESIAN PRODUCT of the changes result set

  • Effect of an additional table in the FROM clause in the query results?

    I recently helped a colleague debug one of their SQL statements

    The output was showing some very unexpected totals, and I was able to shrink down to an additional table in the FROM clause, but not used anywhere else in the application.

    Thus, for example

    SELECT A.ID, B.CODE
    Of
    EMPLOYEE,
    B OF THE STATUTE,
    PAY THE SAL
    WHERE A.ID = B.ID
    AND
    A.ID = 1;

    I was wondering, how can an extra table in a FROM clause influence directly on the rest of the query?

    The query above is just an example of what I've seen, the my co worker was working on is a bit larger and a lot more code to read. I noticed that when I added/removed the extra table in my query to co workers and then it worked as expected.

    I always thought that an additional table is not attached to what anyone would be just to do the inefficient code, but does not affect output
    just do the inefficient code

    Yes, that too, you will get a Cartesian product by calling is not the entries in the where clause for this table 'disappeared' :(

  • Question on the use of expressions and aliases in the FROM clause

    Hello

    I have the following query
     select substr(e.ename, iter.pos, 1) as C
       from (select 'KING' as ename from dual) e,
            (select rownum as pos from dictionary where rownum <= 100) iter
      where iter.pos <= length(e.ename);
    outputs (of your choice):
    C
    -
    K
    I
    N
    G
    For the purposes of hardcode 'KING' was made for the test, IRL would be a column from other tables. Is the other piece that is hardcoded "where rownum < = 100 ' and it's the one I would like to find a way to remove.

    I tried the following:
     select substr(e.ename, iter.pos, 1) as C
       from (select 'KING' as ename from dual) e,
            (select rownum as pos from dictionary where rownum <= length(e.ename)) iter
      where iter.pos <= length(e.ename);
    Unfortunately this does not work because the SQL parser has not analyzed enough of the FROM clause to know e.ename causing the length (e.ename) expression return a message identifier unknown.

    I tried to restructure the query above to make the SQL parser aware of the e.ename early enough and therefore accept it. My efforts have failed.

    I would like to know if there is a way to restructure the statement length (e.ename) can be used instead of Hardcoding an artificial upper limit (for example 100 as in the first statement).

    Thank you

    John.

    Use CONNECT BY LEVEL:

    SQL> select substr(ename, level, 1)
      2  from ( select 'KING' ename
      3         from   dual
      4       )
      5  connect by level <= length(ename);
    
    S
    -
    K
    I
    N
    G
    
    4 rows selected.
    
  • Error in FROM clause (MS Access)

    I am getting an "error running a database query." The query is a simple

    < name cfquery = "myquery" datasource = "#application.dsn #" >
    SELECT *.
    OF #url.table #.
    < / cfquery >

    The debugging info I get is the following:
    SELECT * COMMAND
    VENDORERRORCODE-3506
    SQLSTATE 42000

    It also indicates the error is in the FROM clause and only happens when url.table is stopped, not other names of tables. I know that the order table exist because I get an error of table name that does not exist when the url table is a false table name. This implies that
    He knows the order table exist but said that there is a mistake in the FROM clause. The query is successful on all other tables in my db (MS access, I use the access without unicode driver). Any ideas?

    the order is a keyword, you will need to avoid using brackets
    [ORDER]
    HTH
    --
    Tim Carley
    www.recfusion.com
    [email protected]

  • How to put the subquery in the from clause

    Hi all

    I want to put a my from clause subquery. I want to show the details of an account, when the status is active, but I want to show the date when he opened.

    Here is my report query.

    Select t.acct_id, x.acct_status_Dt
    of cust_acct t, (select t1.acct_id, t1.acct_status_Dt from t1 cust_acct where t1.acct_status_code = 'OPEN') x
    where t.acct_id = x.acct_td
    and t.acct_status_code = 'ACTIVE'

    Someone knows how to impliment this kind of query in OBIEE without RPD Exchange.

    Help, please...

    Hello

    To be more clear, ask in the Advanced tab of the request, should look like:

    select A.saw_0, x.saw_1 from (select acct_id saw_0 from cust_acct)A, (select acct_id saw_0, acct_status_Dt saw_1 from cust_acct where cust_acct.acct_status_code='OPEN') x
    where a.saw_0=x.saw_0
    

    Actual query that you pasted:

    select t.acct_id,x.acct_status_Dt
    from cust_acct t , (select t1.acct_id, t1.acct_status_Dt from cust_acct t1 where t1.acct_status_code='OPEN') x
    where t.acct_id= x.acct_td
    and t.acct_status_code='ACTIVE'
    

    I think it is x.acct_id in where clause... not x.acct_td, I corrected and wrote the sql above...

    Published by: Kishore Guggilla, July 17, 2009 12:00

  • Join the table orders from clause

    Hi all

    Who is the effective way to join the tables in from clause. I have two tables first with 20 lakh records and second containing 10 lakh recods.
     
    QUERY 1:  SELECT T4.ID,T4.ISO_NAME  FROM T,T4 
    WHERE T4.ISO_NAME LIKE '%US%' AND T.ID=T4.ID;
    
    QUERY 2:  SELECT T4.ID,T4.ISO_NAME  FROM T4,T 
    WHERE T4.ID=T.ID AND  T4.ISO_NAME LIKE '%US%';
    
    T(ID IS PRIMARY KEY) 
    (20 lakh records)
    
    T4 (ID IS PRIMARY KEY ) 
    (10 lakh records)
    ---------------------
    ID     ISO_NAME
    100  US,UK,IN,BR
    101  UK,US,BR,IN
    102  BR,UK,US,IN
    
    
    Note: No index on ISO_NAME .
    Who is the effective query 1 or 2. Please suggest me if you have an idea to rewrite the query.



    Kind regards
    Rajasekhar

    Published by: SuNRiZz68 on January 29, 2009 04:22

    In practical terms, Alex is right. Sometimes it matter what table is selected first, but does the CBO generally a very good job of deciding what you need to select the first (assuming that your statistics are up to date) but this is the situation you are trying to avoid as much as possible.

    If you specify a table main command tables in the clause is not reliable and should be used - but think before using advice and don't do that when necessary.

    Which table to select depends firstly on the join method in the execution plan. Nested loops joins perform better by selecting in the smaller table first, make a loop on the largest table. Joins the smaller set hash table in memory first, and then go through the larger table, perform searches in memory. He can't make any difference, what table is read using first the merger joins and sort.

    Back to your original question. Using the cost-based optimizer, both queries will probably roll the same because newer versions of Oracle (9i, 10g) often transform queries for efficiency before the execution anyway. According to what do you or do not request should probably run a nested loop or hash join. With a small set of data creaing index and using a search of nested loops will probably be faster to avoid full table scans. the '%' in the LIKE clause leader would ignore an index on the ISO_NAME column in any case if a main column may be used in a composite index. All this is based on the approximation using the information provided; Tuning questions should always be tested to unexpected developments.

  • Number of tables in the from clause

    Hello
    Can someone tell me how many tables can we have clause in oracle.

    As you can see it

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/limits003.htm#i288032

    Subqueries levels Maximum of subqueries in a unlimited SQL in the FROM clause in subqueries queries Top Level 255 in the WHERE clause

    Subqueries in the FROM-> unlimited, so number of tables is also unlimited (limited only by the size of SQL and probably time of your life while waiting to join thousands of tables :)) results

  • decode in from clause

    Hi the gems... Good evening..

    Can we use DECODE in clause of a SELECT FROM statement...
    I give an example below:

    SELECT cust_name
    DECODE ((SELECT currency OF currency_master),
    "INR"
    (SELECT * FROM cust_master_india);
    (SELECT * DE cust_master_others))

    currency_master table has only one line, USD or INR.

    Is it possible to write a query like this... Please help...

    Explain in words what are you trying to achieve. Looks like you want to select cust_name cust_master_india if the currency in the currency_master table is "INR", otherwise, you want to select cust_name cust_master_others.

     SELECT  t1.cust_name
       FROM  cust_master_india t1,
             currency_master t2
       WHERE t2.currency = 'INR'
    UNION ALL
     SELECT  t1.cust_name
       FROM  cust_master_others t1,
             currency_master t2
       WHERE t2.currency = 'USD'
    /
    

    SY.

  • Update with FROM clause

    Hello

    Need help to form a request to meet the below condition.

    I have to update the columns in table1 from table2, joining the table1 and table2 based on the primary key.

    Similar to:
    Update entire table1 (table1.champ1, table1.champ2) = (select Field1, Field2 from table2 where field3 = 'value')
    where table1.pk_field = table2.pk_field

    But table2 is not identified in the where clause. Please advice.

    My database is oracle9i.

    Thank you.

    Merge stmt is a good solution

  • HOW TO USE CLOB IN FROM CLAUSE

    Hello

    I have a requirement to use a CLOB as one of the tables in a select statement. It works very well in XML report. I need to use it in the package and its throwing me name error table not valid.

    Here's a sample query that I try to use

    c_CLOB CLOB.

    c_clob: = select col1, col2, col3,...;

    procedure generate_data

    is

    cursor c_data

    Select t1.colA, t2colB... etc.

    CL. Col1, cl.col2,... etc.

    FROM table1 t1,

    tabl2 t2,

    c_clob cl

    where cl.col1 = t1.colc

    and cl.col2 = t2.colD

    .....

    Any help / suggestions on this is much appreciated. Thanks in advance.

    A clob is not an array, it is a data type for the column, variable, or parameter.

    If you want to use to define SQL and fetch it, you can use dynamic SQL or SYS_REFCURSOR.  Here is an example of the latter:

    declare

    CLOB c_CLOB;

    News sys_refcursor;

    whole vcol1;

    whole vcol2;

    Start

    c_clob: = ' select 1 as col1, col2 from union double every 2

    Select col1, col2 from 1 dual 2';

    Open the heart of c_clob;

    loop

    extract the heart in vcol1 vcol2;

    When the output cur % NOTFOUND;

    DBMS_OUTPUT. Put_line (' vcol1 = ' | vcol1 |', vcol2 = ' | vcol2);

    end loop;

    close cur;

    end;

    Output of DBMS:

    vcol1 = 1, vcol2 = 2

    vcol1 = 1, vcol2 = 2

  • Query OBIEE adding additional tables in from clause

    Hello

    I have a logic with multiple LTS in tables when trying to query form only one column this logic table adds a few additional tables in which the clause of the query. Could if it you please let me know what could be the reason behind this issue.

    Here, I would add the query should be and what query generates OBIEE.

    I have a logical table - T_SO_ACCRUAL_PRODUCTS with source table logic multi.

    tables is LTS - INV_PRODUCT_GROUP1, Inv_Accrual_Groups, Inv_Grade_Code, Inv_Item_Classes, Inv_Item_Codes, PS_DAILY_STANDING_DETAILS, T_So_Customer_Request, PS_DAILY_STANDING_DETAILS_FREZ, T_So_Request_Details, T_SO_ADJUSTED_QTY, T_SO_ACCRUAL_MASTER, T_SO_ACCRUAL_PRODUCTS

    Now I have an ITEM_NUMBER column in the Inv_Item_Codes table (which I added in forT_SO_ACCRUAL_PRODUCTS LTS).

    I select only that ITEM_NUMBER in analysis of BI to find only the ITEM_NUMBER in INV_ITEM_CODE, so that the query selection must be--

    Select 0 distinct as c1.

    D1. C1 C2

    Of

    (select distinct T2010613. ITEM_NUMBER C1

    Of

    SALES_E0. D1 INV_ITEM_CODES T2010613)

    But the query I get in the nqquery.log file.

    Select 0 distinct as c1.

    D1. C1 C2

    Of

    (select distinct T2010613. ITEM_NUMBER C1

    Of

    SALES_E0. INV_ITEM_CODES T2010613,

    SALES_E0.PS_DAILY_STANDING_DETAILS T2010846,

    SALES_E0.PS_DAILY_STANDING_DETAILS_FREZ T2010861,

    T_SO_CUSTOMER_REQUEST T2011274,

    T_SO_REQUEST_DETAILS T2011561,

    SALES_E0. T_SO_REQUEST_TRANSACTIONS T2011657

    where (T2010613. ITEM_NUMBER = T2010846. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2010861. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2011561. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2011657. ITEM_NUMBER and T2010846. CUSTOMER_NUMBER = T2011274. CUSTOMER_NUMBER and T2010861. CUSTOMER_NUMBER = T2011274. CUSTOMER_NUMBER and T2011274. REQUEST_NUMBER = T2011561. REQUEST_NUMBER and T2011561. ITEM_NUMBER = T2011657. ITEM_NUMBER and T2011561. LINE_NUMBER = T2011657. LINE_NUMBER and T2011561. REQUEST_NUMBER = T2011657. REQUEST_NUMBER)

    ) D1

    I don't understand, why is the addition of these additional tables that I select only one column of the INV_ITEM_CODES table.

    Does anyone have an idea about it, why he adds these additional tables in the query?

    Thank you in advance for your help!

    Gerard

    [nQSError: 43119] Query Failed: [nQSError: 14025] indeed no table exists at the level of detail required

    Possible reasons:

    (1) level of content is not defined in the layer MDB of the SPR to one of the measures or dimension

    Logical Table-> content-> logical level tab-> Fact1/Fact2/Dim1: Source

    (2) Admintool WARNING: logical dimension table [39008]... a... a source that do not adhere to any source of fact.

    -> to check business model (and by the way of physical model) diagram for: Fact1, Fact2, Dim1

    (3) lack of aggregation method the measurement made ('Aggregation' of the measurement column tab)

    -> set aggregation (perhaps ' amount') for measures

    Looks like you have a lot of tables, but put them as sources of logical table, when they could not logically be related ' ' it... If you want you can send me your SPR and I can watch what you are doing.

  • From clause

    Hi all

    I have this code in a trigger of pre-requete:

    IF: RADIO_GROUP = 1

    THEN

    SET_BLOCK_PROPERTY('ALL_ADMITTED_PATIENT',QUERY_DATA_SOURCE_NAME,
                            '(SELECT PM.PATIENT_FILE_NO,
                                   PE.EPISODE_NO,
                                   DECODE(CURRENT_LANG_P_S,''P'', PATIENT_NAME_P  ||'' ''||PATIENT_NAME_2_P||'' ''||
                                                                                     PATIENT_NAME_3_P||'' ''||PATIENT_NAME_F_P,
                                                                                     PATIENT_NAME_S  ||'' ''||PATIENT_NAME_2_S||'' ''||
                                                                                     PATIENT_NAME_3_S||'' ''||PATIENT_NAME_F_S ) PATIENT_NAME ,                                                              
                                   EXSYS.GET_AGE(PM.DATE_OF_BIRTH,SYSDATE) AGE ,
                                   CODES_PKG.GET_DESCRIPTION(PM.GENDER,103) GENDER,
                                   CODES_PKG.GET_DESCRIPTION(PM.PATIENT_CATEGORY,110) PATIENT_CATEGORY,                               
                                   PE.ATTENDANCE_TYPE  ,
                                   PE.START_DATE       ,
                                   PE.END_DATE END_DATE,
                                   PE.PATIENT_INVOICE_NO ENCOUNTER_ID
                                   
                            FROM   RC_PATIENTS             PM,
                                   RC_PATIENT_EPISODES     PE    
                                   
                          WHERE  PM.PATIENT_FILE_NO              = PE.PATIENT_FILE_NO                        
                           
    

    There is a block that has points for each column in the select statement, next to an another element called ' clinical discharge Date "which I can't delete,.

    because there is another code in the same trigger before query selects the column "Date of clinical discharge", the code is:

    ELSIF: RADIO_GROUP = 2

    THEN

    SET_BLOCK_PROPERTY('ALL_ADMITTED_PATIENT',QUERY_DATA_SOURCE_NAME,
                            '(SELECT PM.PATIENT_FILE_NO,
                                   PE.EPISODE_NO,
                                   DECODE(CURRENT_LANG_P_S,''P'', PATIENT_NAME_P  ||'' ''||PATIENT_NAME_2_P||'' ''||
                                                                                     PATIENT_NAME_3_P||'' ''||PATIENT_NAME_F_P,
                                                                                     PATIENT_NAME_S  ||'' ''||PATIENT_NAME_2_S||'' ''||
                                                                                     PATIENT_NAME_3_S||'' ''||PATIENT_NAME_F_S ) PATIENT_NAME ,                                                              
                                   EXSYS.GET_AGE(PM.DATE_OF_BIRTH,SYSDATE) AGE ,
                                   CODES_PKG.GET_DESCRIPTION(PM.GENDER,103) GENDER,
                                   CODES_PKG.GET_DESCRIPTION(PM.PATIENT_CATEGORY,110) PATIENT_CATEGORY,                               
                                   PE.ATTENDANCE_TYPE  ,
                                   PE.START_DATE       ,
                                   NVL(PE.ACTUAL_END_DATE,PE.END_DATE)END_DATE , 
                                        PE.PATIENT_INVOICE_NO ENCOUNTER_ID ,
                                        PA.CLINICAL_DISCHARGE_DATE ----------------------------------------------------------------------------------------- this is the column
                            FROM   RC_PATIENTS             PM,
                                   RC_PATIENT_EPISODES     PE,
                                   AD_PATIENT_ADMISSIONS PA
                          WHERE PA.ADMISSION_NO = PE.ADMISSION_NO
                            AND  PM.PATIENT_FILE_NO              =PE.PATIENT_FILE_NO    
    

    So the only situation I have is to include the column 'CLINICAL_DISCHARGE_DATE' in the first select statement see you and add the table and then enclose it with other tables, but

    I can't do this becaue if not done the join, it retrieves no data, so I can't add, and

    of course, I see an error when I click on the: radio_group (1) because the element is existed without a column in the select list.

    How to solve this problem,

    I can't delete the point, and I can not add the column in the first select statement?

    How?

    Thank you

    I found it, thank you,

    I can add

    To_date (null) or ANY DATE in the select statement.

    Thank you

  • * Dynamic * Table name in the From Clause, with the help of the cursor

    Hello
    I said a slider...
    Select the table table_name from dba_tables where < blah >
    The result is
    Row1: emp
    rwo2: emp_1-> tables have the same structure and quite different data... Please don't ask why it's like that, and we can not change...

    Now, we need to run an Insert...

    Insert into tableX (col1, col2,...) select a, b,... from < o/p of the cursor > where < blah >...
    Note: The table changes name and it the cursor can o/p emp, emp_a and emp_b.

    Trying to do at the same time instead of do series and with the best performance... .no sql injection issues.
    In parallel, I mean
    Insert into tableX (col1, col2,...) select a, b,... from emp where < blah >
    and insert tableX (col1, col2,...) select a, b,... from emp_1 where of < blah > statements at the fire parallel / at the same time to the database. If you can share the procedure if you guys already have with you... is really appreciated

    Thank you very much for your time...

    Published by: user007009 on April 27, 2013 20:33

    >
    because suppose each request took 10 minutes and we have 5 tables, then 50 minutes so executed in series and 5 minutes, if each of them both right... I'm saving this time
    >
    And that's what I'm talking about when I said that
    >
    what you're doing wrong is trying to implement solutions more possible complex for a problem that does not exist yet.
    >
    You do not HAVE a problem. You are just "assuming"; "Suppose that each query took 10 minutes... ».

    Well suppose that the time it takes to "chunk" the query, run it in parallel is longer than the time it takes to simply run the query. Oh, wait, that OF what you have discovered.

    Well, let's assume that each query took 2 seconds. Assume that all this takes that half a second. Suppose you waited until you actually have a problem.

    The solutions are to solve real problems, not imaginary and non-existent problems.

    If all you are doing is "assume that" you will never find a 'solution' because you could always 'suppose' another problem that prevents this 'solution' of work.

Maybe you are looking for