Where in clause vs. between clause with date conditions

Hi Forum.
I am struggling with two different query structures and wonder why one is more costly than the other one. Does anybody have any idea?
Query a) Total Cost: 188. Bytes 511,966. Cardinality: 2,639
Query b) Total Cost: 112. Bytes 511,966. Cardinality: 2,639
Example:
Query a) select * from table where trunc(date_time) between to_date('10/12/2011','DD/MM/YYYY') and to_date('20/12/2011','DD/MM/YYYY') and XYZ_ID = 007
Query b) select * from table where trunc(date_time)
in (
to_date('10/12/2011','DD/MM/YYYY') ,
to_date('11/12/2011','DD/MM/YYYY'),
to_date('12/12/2011','DD/MM/YYYY'),
to_date('13/12/2011','DD/MM/YYYY'),
to_date('14/12/2011','DD/MM/YYYY'),
to_date('15/12/2011','DD/MM/YYYY'),
to_date('16/12/2011','DD/MM/YYYY'),
to_date('17/12/2011','DD/MM/YYYY'),
to_date('18/12/2011','DD/MM/YYYY') ,
to_date('19/12/2011','DD/MM/YYYY') ,
to_date('20/12/2011','DD/MM/YYYY')
and XYZ_ID = 007
-The table has local index on date_time and XYZ_ID
-The table is partitioned like:
PARTITION VALUES LESS THAN (TIMESTAMP' 2011-12-16 00:00:00')
PARTITION VALUES LESS THAN (TIMESTAMP' 2011-12-17 00:00:00')
etc.
-Database: 11gR1
If any other information needed, please ask for it.
Thanks for this discussion!
- Ugur-
Edited by: user11384454 on 23.12.2011 04:56

Hi,
user11384454 wrote:
I am struggling with two different query structures and wonder why one is more costly than the other one. Does anybody have any idea?
Query a) select * from table where trunc(date_time) between to_date('10/12/2011','DD/MM/YYYY') and to_date('20/12/2011','DD/MM/YYYY') and XYZ_ID = 007
Query b) select * from table where trunc(date_time)
in (
to_date('10/12/2011','DD/MM/YYYY') ,
to_date('11/12/2011','DD/MM/YYYY'),
to_date('12/12/2011','DD/MM/YYYY'),
to_date('13/12/2011','DD/MM/YYYY'),
to_date('14/12/2011','DD/MM/YYYY'),
to_date('15/12/2011','DD/MM/YYYY'),
to_date('16/12/2011','DD/MM/YYYY'),
to_date('17/12/2011','DD/MM/YYYY'),
to_date('18/12/2011','DD/MM/YYYY') ,
to_date('19/12/2011','DD/MM/YYYY') ,
to_date('20/12/2011','DD/MM/YYYY')
and XYZ_ID = 007Because your 2 queries are functionnaly different.
Query A would retrieve rows where date_time=to_date('10/12/2011 11:23:45','DD/MM/YYYY HH24:MI:SS') where the query B wouldn't.

Similar Messages

  • Difference between initialization with data transfer?

    Dear Ones,
    What is the Difference between initialization with data transfer,initialization without data transfer and early delta initialization?
    Please explain me in senario basis..
    Thanks
    Shiva

    Hello Shivananda,
    See oss note 505700 :
    The early delta initialization is used to admit document postings
                in the OLTP system as early as possible during the initialization
                procedure.
    Regards,
    Fred

  • Diff between init with data transfer and repair full request

    hi,
    i have observed that even in the new flow we are doing init without data transfer and then repair full request
    if i do init with data transfer also i can achieve the same?
    i want to know why we need to do this ,do we have any advantage of doing init without transfer and repair full request?
    please suggest me

    Hi Venkat,
    A repair full request is loaded in cases where you get erroneous records or where there are missing records which you want to load. In such cases, a repair full request for the selective records can be loaded and is the most efficient way to correct the data, since you won't be required to load the entire data once again. Also you acheive the desired result without disturbing the delta. (You are not required to do an init w/o data transfer after a repair full, people just do it a a precaution)
    However, repair full requests should only be loaded to infoproviders with update mode 'overwrite'. Otherwise, if the InfoProvider, its very probable that you might double the value of the key-figures due to rows being added twice - in case of an InfoProvider with update mode 'Additive'. So, if your InfoProvider is additive, you will need to delete the entire data and do an 'init with data transfer' to avoid corrupting the data. (Note: you can do a repair full request for an additive infoprovider in case of lost records or if you can delete erroneous records with selective deletion.But you have to be careful with the selections lest you inadvertently load other records than required and corrupt the data)

  • BETWEEN function with dates

    Hi,
    how do i edit my where clause to display between the SYSDATE and exactly one month before that date?
    i know it's something like
    WHERE last_used >=SYSDATE
    AND last_used is <=??????
    i don't know what to put after that...
    anybody know?

    Daniel,
    This might get you what you want:
    WHERE last_used &gt;=SYSDATE
    AND last_used is &lt;= add_months(sysdate, -1)
    If this answers your question, please assign points and close the question..
    Thank you,
    Tony Miller
    Webster, TX

  • Delta between ODS with Data field as key field

    Hello,
    I have a problem with a data load between two ODS. Below is the scenario
    ODS 1 has delivery data with delivery Doc and Delivery Item as key field and Plant,Material, Delivery Qty, etc..  as Data filed
    ODS 2 need to create as a aggregare at the plant, material level. So for ODS 2, Key Field is Plant, Material and the Data filed is Delivery Qty (additive), etc...
    When I load the Full load it works correctly, But when I bring the data as a delta it is updating the delivery Qty incorrectly and some of the data fileds are comming as blank also eventhough the source ODS (ODS1) has data.
    Can we use data filed from ODS1 as a Key filed for ODS2 ?
    Is that causing the
    Regards,
    Biju

    Hi,
    Looks like someone deleted/ added/ updated some entries in the change log table of ODS1.
    Did you check the "Change log" of ODS1 and compare with the delta request of ODS2?
    Isn't change log of ODS1 showing the entries you got as part of delta in ODS2?
    Another recommendation would be to compare the "Change log" of ODS1 with the "Active" table of ODS1 and see if they are showing the same value of the key figures.
    - Ashish

  • Communication between servlets with data

    I have a servlet that creates a HTML table (a report) with some data. The data used is a vector of some java objects. Now, I want to add a hyperlink to each row in the table and when clicked, open a new browser window and show the record info in detail. I know how to add a hyperlink and open a new window, but I do not know how to pass the data associated with that (user-clicked) row to a new browser window. The Java object for that row contains 20 items and I do not want to pass them in name-value pair to another servlet. Is there a smarter way to do this ? Can someone please help me?
    This is a rough sketch of how I want to put a hyperlink in a row: The following method creates rows in my table:-
    private void loadTableData(Vector data, PrintWriter out, int col)
            throws IOException {
            MyRecordObject myRec = null;
            if (data != null) {
                Object[] myArray = null;
                myArray = new Object[data.size()];
                for (int k = 0; k < data.size(); k++) {
                    myArray[k] = data.get(k);
                Arrays.sort(myArray, new MySorterClass(col));
                for (int i = 0; i < myArray.length; i++) {
                    myRec = (MyRecordObject) myArray;
    out.println("<TR bgcolor= \"E5E5E5\"> ");
    // When the following hyper link
    //is clicked, pass "myRec" object to some servlet/JSP
    //and create a new HTML page with that data
    out.println("<TD> <a href=\"myDetailInfoServlet_with_data\" target =\"_blank\"> " + myRec.getName() + " </a> </TD>"); // <==
    out.println("<TD>" + myRec.getFathersName() + "</TD>");
    out.println("<TD>" + myRec.getMothersName() + "</TD>");
    out.println("<TD>" + myRec.getPetName() + "</TD>");
    out.println("<TD>" + myRec.getSpouseName() + "</TD>");
    out.println("</TR>");
    out.println("</TBODY>");
    out.println("</TABLE>");
    out.println("</div>");
    out.println("</html>");

    My approach would be to just pass along an id with the hyperlink. Something you use to identify which record you want to display. This can be the recordId, or maybe the index of it in the data vector if that is still available and hasn't changed.
    eg
    out.println("...<a href=\"myDetailInfoServlet_with_data\?id= " + i + " ...
    Also, I would recommend using JSPs for this sort of stuff.
    For sure, retrieve your data in a servlet, but then just put it into request/session variables, and forward to a JSP to display.
    using out.println for table code is a real pain in the butt.
    Cheers,
    evnafets

  • CAML Query returning all items with date condition

    HI,
    I have a problem doing a query with CAML over the elements of a calendar in SharePoint 2013
    I just want to retrieve all items, which have been modified on a particular date. But below query returns all items from the Calendar.
    Any suggestion how to get specific items from the calendar. The same issue exists for start date  and end date.
      var oWebsite = clientContext.get_web();
        this.collList = oWebsite.get_lists();
        var camlQuery1 = new SP.CamlQuery();
       camlQuery1.set_viewXml(
       '<query><Where>'+
          '<Eq>'+
             '<FieldRef Name=\'Modified\'  IncludeTimeValue=\'TRUE\'/>' +
             '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
          '</Eq>'+
       '</Where></query>');
        this.collListItem1 = oList.getItems(camlQuery1);
        clientContext.load(collListItem1);

    Firstly try to make this change in your query and see if that helps
    camlQuery1.set_viewXml(
    '<View><Query><Where>'+
    '<Eq>'+
    '<FieldRef Name=\'Modified\' IncludeTimeValue=\'TRUE\'/>' +
    '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
    '</Eq>'+
    '</Where></Query></View>');
    Geetanjali Arora | My blogs |

  • DBDataSources with Date Condition

    Hi Experts,
    I'm having troubled with the DBDatasources when I used the datetime field but for other type of field it is working fine.
    below is my condition code.
                Dim oConditions As SAPbouiCOM.Conditions
                Dim oCondition As SAPbouiCOM.Condition
                oConditions = New SAPbouiCOM.Conditions
                oCondition = oConditions.Add
                oCondition.Alias = "U_StartDate"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_GRATER_EQUAL
                oCondition.CondVal = "5/16/2014"
                oDBDataSource.Query(oConditions)
    Thanks,
    Jim

    Hi Jim,
    Did you try to use yyyymmdd as the dateformat?
    Regards
    Ad

  • Any user exit where XNAST comes with data

    Hi all,
    Is there any user exit at delivery time where I can find the xnast with data.
    Thanks.

    Good morning all,
    Is not there any exit?
    Thanks.
    Deniz.

  • Performance with dates in the where clause

    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?
    Thanks in advance.
    Execution Plan 1:
    SQL> select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1486387033
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 517 (20)| 00:00:07 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | TABLE ACCESS FULL| TEST_DATA | 341 | 3069 | 517 (20)| 00:00:07 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(INTERNAL_FUNCTION("FDATE"))=TRUNC(SYSDATE@!))
    Note
    - dynamic sampling used for this statement
    Statistics
    4 recursive calls
    0 db block gets
    1610 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    Execution Plan 2:
    SQL> select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(SYSDATE@!)<=TRUNC(SYSDATE@!)+.9999884259259259259259
    259259259259259259)
    3 - access("FDATE">=TRUNC(SYSDATE@!) AND
    "FDATE"<=TRUNC(SYSDATE@!)+.999988425925925925925925925925925925925
    9)
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows
    Execution Plan 3:
    SQL> select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_dat
    e('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TO_DATE('21-APR-10','dd-MON-yy')<=TO_DATE('21-APR-10
    23:59:59','DD-MON-YY hh24:mi:ss'))
    3 - access("FDATE">=TO_DATE('21-APR-10','dd-MON-yy') AND
    "FDATE"<=TO_DATE('21-APR-10 23:59:59','DD-MON-YY hh24:mi:ss'))
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    Hi,
    user10541890 wrote:
    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);Did you mean fdat<b>e</b> (ending in e)?
    Be careful; post the code you're actually running.
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?To use an index, the indexed column must stand alone as one of the operands. If you had a function-based index on TRUNC (fdate), then it might be used in Query 1, because the left operand of = is TRUNC (fdate).
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?That depends on what you mean by "better".
    If "better" means faster, you've already shown that one is about as good as the other.
    Queries 2 and 3 are doing different things. Assuming the table stays the same, Query 2 may give different results every day, but the results of Query 3 will never change.
    For clarity, I prefer:
    WHERE     fdate >= TRUNC (SYSDATE)
    AND     fdate <  TRUNC (SYSDATE) + 1(or replace SYSDATE with a TO_DATE expression, depending on the requirements).
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?Sorry, I can't.

  • Query with date in where clause

    hi,
    i have build a view with join conditions from 8 tables. the data from this view is more then 100,000
    when i run the query with different clause its work with some seconds. but when i put date column in where cluase it sleeps.
    eg..
    where unit_id = 4 and t_id = 's09' and vb like '%amb%'
    works fine.
    where unit_id = 4 and t_id = 's09' and vb like '%amb%' and date between dt1 and dt2
    now sleep
    please ......give me some suggestions

    hi i have done the explain plan
    the result is
    Operation Object
    SELECT STATEMENT ()
    NESTED LOOPS ()
    NESTED LOOPS ()
    HASH JOIN ()
    HASH JOIN ()
    TABLE ACCESS (FULL) PR_PO_MST
    TABLE ACCESS (FULL) PR_SUPPLIER
    TABLE ACCESS (FULL) PR_PO_DTL
    TABLE ACCESS (BY INDEX ROWID) INDENT_MST
    INDEX (RANGE SCAN) ST_IND_MST_IDX
    TABLE ACCESS (BY INDEX ROWID) ST_ITEM
    Operation Object
    INDEX (UNIQUE SCAN) PK_ST_ITEM
    now wot do do????

  • Problem with date fields in where clause after changing driver

    Hi,
    We have changed the oracle driver we use to version 10
    and now we have some trouble with date-fields.
    When we run this SQL query from our Java program:
    select *
    from LA_TRANS
    where LA_TRANS.FROM_DATE>='20040101' AND LA_TRANS.FROM_DATE<='20041231'
    We get this error code:
    ORA-01861: literal does not match format string
    The query worked fine whit the previous driver.
    Is there some way I can run a SQL query with date fields
    as strings in the where clause?
    Thanks!

    Keeping the argument of standard SQL or not aside, comparing DATE columns to a constant string (which looks like a date in one of the thousands of the formats available, but not in others) is NOT one of the best programming practices and leads to heartburn and runtime errors (as you have seen yourself).
    I would rather compare a DATE to a DATE.
    Also, constants like that would be another issue to fix in your code:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:6899751034602146050::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:528893984337,

  • Perf tuning issue with a query involving between clause

    Hi all,
    I am getting issues with performance when I try to execute this query. Given below the query and it is going for a full table scan. I think the problem is with the between clause. But I dont know how to resolve this issue
    SELECT psm.member_id
    FROM pre_stg_member psm
    WHERE psm.map_tran_agn BETWEEN :start_transaction_agn and :end_transaction_agn
    and psm.partition_key = :p_partition_key;
    Having composite index on map_tran_agn and partition_key.
    Please help me in this regard.
    Thanks,
    Swami

    Please consider the following when you post a question.
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Outer join with BETWEEN clause

    Hi All,
    I have 2 tables (A and B) which i need to join. I need all records from table A and matching records from the table B. below is the structure.
    TABLE A (total rows = 10)
    ROW_WID
    GL_DATE
    LOCATION_CODE
    TABLE B (total = 7)
    ROW_WID
    START_DATE
    END_DATE
    LOCATION_CODE
    Initially, we were asked to join based on location_code. In the table B, some of the LOCATION_CODE are missing, which is present in table A.
    We wrote below query
    SELECT A.*, B.START_DATE, B.END_DATE
    FROM A, B
    WHERE A.LOCATION_CODE = B.LOCATION_CODE (+)
    This gives 10 records, where 3 records have START_DATE and END_DATE NULL. because of outer join
    It gave all records from the A table. It worked fine. Now i need to add one more condition where A.GL_DATE between B.START_DATE and B.END_DATE
    If i write this
    SELECT A.*, B.START_DATE, B.END_DATE
    FROM A, B
    WHERE A.LOCATION_CODE = B.LOCATION_CODE (+)
    AND A.GL_DATE BETWEEN B.START_DATE and B.END_DATE
    This gives me only 7 records. IS IT POSSIBLE TO ADD OUTER JOIN with BETWEEN clause.

    Hi All,
    I'm in a similar situation,
    I have a complex query, everything is working fine, except this part (I will simplify everything, removing other stuffs because I need help only on the following condition)
    SELECT *
    from transaction t, card c
    where c.card_id = t.card_id (+)
    and t.trn_date between to_date ('01/01/2012','dd/mm/yy') and ('01/01/2013,'dd/mm/yy')
    How could i OUTER JOIN the between condition?
    I tried with
    and t.trn_date between to_date ('01/01/2012','dd/mm/yy') (+) and ('01/01/2013','dd/mm/yy') (+)
    but returns a "missing expression" error.
    Surely I'm missing some stupid thing about it, could you help me on this? (probably because I'm talking about parameters and I cannot put the outer join on a value)
    How can I rewrite the condition in order to satisfy what I'm trying to accomplish?
    Thanks in Advance,
    Alex
    Edited by: 981667 on 14-gen-2013 4.23
    Edited by: 981667 on 14-gen-2013 4.24

  • Where can i get documentation on WITH clause?

    DB version:10gR2
    In OTN forums, i always see WITH clause being used to generate sample data, like the one used in the following thread
    How do I ORDER BY here?
    with data as
      select 666 as emp_id, 'JobA' as job_name, 'test_emp' as emp_name, 'test_team' as team, '08:00-11:48' as date_1, '07:00-08:00' as date_2, '08:00-11:48' as date_3
      from dual
      union all
      select 666 as emp_id, 'JobA' as job_name, 'test_emp' as emp_name, 'test_team' as team, '07:00-08:00' as date_1, null as date_2, '12:00-15:36' as date_3
      from dual
      union all
    .I want to know more about WITH clause, but i couldn't find this in Oracle Documentation(SQL Reference 10g Release 2
    Part No.B14200-02). Any idea where i could read about the basics, restrictions of use,..etc on WITH clause?

    Subquery factoring clause in the SELECT syntax...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#SQLRF01702

Maybe you are looking for

  • Acrobat X Pro trial on OSX 10.9

    I want to test Acrobat X Pro on an OSX 10.94 Mac. I don't want Acrobat XI. When I download and install, the trial button is grayed out, but the serial number boxes are there. Does anybody know how to get the trial on OSX 10.94?

  • How to add a field in FV60 transaction ALV

    Hi, I want to add a new field in FV60 transaction, I know that it can be done adding a new screen variant is this right? and how do i do this? What I exactly want is to add a field in the Table Control Named "Distance" and it should be type character

  • KDE 4.2 and dual monitor setup

    Is there any way to make KDE 4.2 understand which monitor is my primary one? It acts like mye left monitor(my tv) is the default monitor, but my right monitor is the which is the primary one. Last edited by Roberth (2009-01-29 23:12:19)

  • Permissions Issues-Seems like many quicktime etc.

    Ran disk utility several times below are the errors. Should I worry? Repairing permissions for “Macintosh HD 17” Reading permissions database. Reading the permissions database can take several minutes. Permissions differ on "System/Library/Frameworks

  • Attachement Id has a bad format

    I am using Mac Lion OX and It happen on both, firefox and safari