Reg: query on calendar.pll

Hi,
how to select a particular day from every week.
Thanks in advance.
Edited by: user648380 on Jan 14, 2010 12:04 AM

In your format mask...
Select to_char(m_date,'"Mon "ddth Mon YYYY') format_date, m_date
from (
SELECT (sysdate+dt ) M_DATE
FROM ( SELECT decode('Mon',to_char(sysdate,'Dy') ,'0', to_char(sysdate+rownum,'Dy'),rownum,null)  DT
             FROM ALL_OBJECTS WHERE ROWNUM <=(add_months(sysdate,20*12) -sysdate) ) Days
union
SELECT (sysdate-dt)  M_DATE
FROM (  SELECT decode('Mon',to_char(sysdate,'Dy') ,'0', to_char(sysdate+rownum,'Dy'),rownum,null)  DT 
             FROM ALL_OBJECTS WHERE ROWNUM <=(add_months(sysdate,20*12) -sysdate) ) Days
)where m_date is not null
order by 2Edited by: Dora on Jan 14, 2010 9:18 AM
Edited by: Dora on Jan 14, 2010 9:20 AM

Similar Messages

  • Calendar.pll

    In reading the help file for Forms there is mention of a "Calendar" list of
    values and a STNDRD20.OLB and CALENDAR.PLL for displaying a calendar with a
    KEY- LISTVAL trigger on a date item.
    My presumption was that I could have the operator do a list of values which
    would provide a "calendar" for the operator to select a date to be placed into
    the date item in this block.
    I followed the instructions, copied the package (PLL) and compiled it clean but
    it will not see the "click_date" procedure when I try to compile the
    KEY-LISTVAL trigger on the date item.
    Help!
    null

    Hi,
    I am using the calender which you mentioned from the oracle demo file.
    Just I opened the calender.fmb and moved neccessary blocks,canvas and procedure (date_choosen) into my form.You have to modify date return item in that procedure.If you want to use this calender for more forms then create your
    own object library and move all those things
    into that.
    If you want that neccessary blocks,canvas and
    procedure just mail me.
    note: You can also directly use that STNDRD20.OLB and CALENDAR.PLL.But we don't need all the objects.
    viji.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by James Phillips ([email protected]):
    In reading the help file for Forms there is mention of a "Calendar" list of
    values and a STNDRD20.OLB and CALENDAR.PLL for displaying a calendar with a
    KEY- LISTVAL trigger on a date item.
    My presumption was that I could have the operator do a list of values which
    would provide a "calendar" for the operator to select a date to be placed into
    the date item in this block.
    I followed the instructions, copied the package (PLL) and compiled it clean but
    it will not see the "click_date" procedure when I try to compile the
    KEY-LISTVAL trigger on the date item.
    Help!
    <HR></BLOCKQUOTE>
    null

  • REG: Query

    Hi All,
    I've requirement in the creating a query which has to display "Wednesday and Saturday" data only, when user enters a Calmonth through variable.
    Like:
    Users enters a calendar month Ex: 09.2008 (dynamically changes).
    Then in the query result it has to show only the Wednesday and Saturday data.
    Please guide me in this issue.
    Thanks in Advance.
    With Warm Regards,
    Ravi

    Hello,
    According to my understanding.
    you want to see the details or sales made on Wed'day and Sat'day.
    Do the following steps.
    1. Create an variable for ZCALDAY.
    2. Go for Project ZUEXITVA in CMOD.
    3. Go for Functional Exit EXIT_SAPLRRS0_001.
    4. Write the following code.
       I am assuming that you have created an variable for ZCALDAY as YCALDAY .
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    Data: v_loc_date type d.
    Data: v_loc_date1 type d.
    Data: v_loc(4) type c.
    case i_vnam.
    when 'ZCALDAY'.
    if i_step = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    where vnam = 'YCALDAY'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-WEDNESDAY
    "Please make sure that how your input comes enter accordingly
    L_S_RANGE-HIGH = LOC_VAR_RANGE-SATDAY.
    "Please make sure that how your input comes enter accordingly
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    Regards,
    Shiva Kumar G.C

  • Query like Calendar

    Hi, Expert
    Can i used only select statement to find query ....
    ( If sysdate is '03-Jul-07' ) like calendar ...
    Date_No Date_Name
    01 SUN
    02 MON
    03 TUE
    14 SAT
    15 SUN
    16 MON
    30 MON
    31 TUE
    Select ... from dual;
    Best Regard
    First_Step

    Problem only is that it is NLS dependent:
    michaels>  alter session set nls_territory=germany
    Session altered.
    michaels>  with pivot as
         (select     trunc (sysdate, 'mm') + level - 1 as dt,
                     abs (to_number (to_char (trunc (sysdate, 'mm') + level - 1,
                                              'd'
                          - to_number (to_char (to_date ('03010001', 'ddmmyyyy'),
                                                'd'
                         ) down
                from dual
          connect by level <= (last_day (sysdate) - trunc (sysdate, 'mm')) + 1)
    select   max (decode (down, 0, dt)) as monday,
             max (decode (down, 1, dt)) as tuesday,
             max (decode (down, 2, dt)) as wednesday,
             max (decode (down, 3, dt)) as thursday,
             max (decode (down, 4, dt)) as friday,
             max (decode (down, 5, dt)) as saturday,
             max (decode (down, 6, dt)) as sunday
        from pivot
    group by trunc ((to_number (to_char (dt, 'dd')) + 7 - down) / 7)
    MONDAY   TUESDAY  WEDNESDA THURSDAY FRIDAY   SATURDAY SUNDAY 
                                                          01.07.07
    02.07.07 03.07.07 04.07.07 05.07.07 06.07.07 07.07.07 08.07.07
    09.07.07 10.07.07 11.07.07 12.07.07 13.07.07 14.07.07 15.07.07
    16.07.07 17.07.07 18.07.07 19.07.07 20.07.07 21.07.07 22.07.07
    23.07.07 24.07.07 25.07.07 26.07.07 27.07.07 28.07.07 29.07.07
    30.07.07 31.07.07                                            
    michaels>  alter session set nls_territory=america
    Session altered.
    michaels>  with pivot as
         (select     trunc (sysdate, 'mm') + level - 1 as dt,
                     abs (to_number (to_char (trunc (sysdate, 'mm') + level - 1,
                                              'd'
                          - to_number (to_char (to_date ('03010001', 'ddmmyyyy'),
                                                'd'
                         ) down
                from dual
          connect by level <= (last_day (sysdate) - trunc (sysdate, 'mm')) + 1)
    select   max (decode (down, 0, dt)) as monday,
             max (decode (down, 1, dt)) as tuesday,
             max (decode (down, 2, dt)) as wednesday,
             max (decode (down, 3, dt)) as thursday,
             max (decode (down, 4, dt)) as friday,
             max (decode (down, 5, dt)) as saturday,
             max (decode (down, 6, dt)) as sunday
        from pivot
    group by trunc ((to_number (to_char (dt, 'dd')) + 7 - down) / 7)
    MONDAY    TUESDAY   WEDNESDAY THURSDAY  FRIDAY    SATURDAY  SUNDAY  
    02-JUL-07 03-JUL-07 04-JUL-07 05-JUL-07 06-JUL-07 07-JUL-07         
    09-JUL-07 10-JUL-07 11-JUL-07 12-JUL-07 13-JUL-07 14-JUL-07         
    16-JUL-07 17-JUL-07 18-JUL-07 19-JUL-07 20-JUL-07 21-JUL-07         
    23-JUL-07 24-JUL-07 25-JUL-07 26-JUL-07 27-JUL-07 28-JUL-07         
    30-JUL-07 31-JUL-07                                                 

  • LOV in query mode (calendar)

    Hello,
    i know it's possible to enter in query mode and then select a value for quwey from a LOV.
    but in case of a Calendar (date_lov.get_date(...) ) i got that 'Undefined control key... press Ctrl+K for a list of all keys'. something like this
    why the LOV does not appear in this case? get_date is a procedure, contained in DATE_LOV package
    so what i want is to enter in query mode and then call the calendar to choose a date as search criteria
    Thanks

    hai,
    Its not possible.
    Because the date control is actually a seperate block, and in Query mode, we cannot more to a separate block.
    Regards,
    Manu.

  • Content Query on Calendar does not show recurring events

    There are three views that come with a Calendar list.  One is the 'Calendar', second is 'All Events' and the other is the 'Current Events'.  The current events is a cool view because it expands out items that have a recurrence (such as yearly).  It also shows only the events that happen today or in the future by filtering out past items.
    I have a content query web part that looks to this calendar which is maintained by the HR area.  The calendar is a holiday schedule for the next 3 years or so.  I can not seem to get the recurring events to expand out like they do with the 'Current Events' view.  If I choose 'All Events' on the list then it will show only our recurring holidays and the holidays that can't be set up as recurring holidays.  The content query web part appears to show only the 'All Events' view.
    Is there a way to make the content query web part use the 'Current Events' view?  I know the view option is there when the list resides on the same site, but in that case it uses a 'List View' web part instead of the content query web part.

    I'm not sure the MOSS option will work for me for a couple of reasons.  First, it seems this would require that the list reside on the parent site and the subsite be the one to use CQWP.  I need to have the list maintained on our HR site where HR people have permissions to modify, and then displayed on the parent site where HR folks don't have permissions to modify.  Also, I have at least two different columns that I really need to display and I haven't found a way to keep a link between two fields in the master list, unless I maybe use a calculated field. 
    The CSS modification may be a solution but I have not modified webparts via css.  I really haven't done many modifications to the css anyway but I'm not afraid to try it out on my test system.  I have looked through the Calendar.css and core.css and I don't find anything with ItemStyles in it.  I have even done a search on the entire web server extensions folder and I still have not found ItemStyles.  Will you please let me know where to find ItemStyles.xsl?
    I found a codeplex project that might help with this.  I could at least display two columns.  However, it doesn't say anything about building out recurrence items so I'm not sure if it will fix my problem.  I'll post my findings once I try it out.
    http://www.codeplex.com/ECQWP
    Thanks for your help!

  • Reg: Query Problem for New Posting Period

    Hi Xperts,
    While I try to Map the A/P Invoices with their respective Outgoing Payment,
    I used the following Query and it's Query Printlayout
    SELECT T0.DocNum [Payment#], T0.DocDate [Payment Date],
    T0.CardCode, T0.CardName, T1.InvoiceId, T2.DocNum [AP Inv#],
    T2.NumatCard [Bill No.], T2.DocDate [Bill Date], T1.selfInv,
    T1.SumApplied, T1.WtAppld, T0.NoDocsum 
    FROM  [dbo].[OVPM] T0  INNER  JOIN
    [dbo].[VPM2] T1  ON  T1.[DocNum] = T0.DocNum
    INNER  JOIN [dbo].[OPCH] T2  ON  T2.[DocEntry] = T1.DocEntry
    WHERE T0.Cardname='[%0]' and T0.DocDate='[%1]' and
    T0.DocNum='[%2]'
    I got the above query from our Expert Mr.Sambath only.
    Now what is the problem is the query is retrieving the payment details of old Posting Period only and not the current posting period.
    In detail, I used 'Primary' Series for FY08-09, Period indicator 'Default'
    Now I'm using 'Primary1' Series for FY09-10, Period indicator '0910'
    Thanx in adv.
    Regards,
    Bala

    Hi Bala,
    Looking at your query, it is not query issue ,it is your data issue.
    Please check if you have data in  VPM2  table  which is bank transfer payment method
    Thank you
    Bishal
    Edited by: Bishal Adhikari on Apr 9, 2009 8:48 AM

  • Reg: Query group by problem

    Hi,
    I am trying to write query for report generation.According to my client requirment I need to calculate the difference
    between two date columns for "n" number of rows and i need to find the number of rows which are smaller
    than 2 and number of rows which are greater than 2 and calculate the percentage for number of rows which are smaller than 2.
    It must grouped by a third column
    I tried like this, but it shows that date column is not a grouped .....
    But I dont want to group that date column... Plz adivce....
    SELECT table1.column2,
          table2.column3,
          COUNT(*),
         CASE
                 WHEN TO_NUMBER (table1.DTT_column3 - table1.DTT_column4) <=2
                 THEN COUNT(*)
                 ELSE NULL
            END
             AS sucess_count,
         CASE
                 WHEN TO_NUMBER (table1.DTT_column3 - table1.DTT_column4) >2
                 THEN COUNT(*)
                 ELSE NULL
            END
            AS fail_count,
         FROM
         table1,
         table2
         WHERE table1.column1 =       table2.column2
         AND table1.column4 = value1
         GROUP BY table1.column2,table2.column3;TIA,
    Message was edited by: ORCL
    ORCLDB

    May be something like this.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
    PL/SQL Release 10.2.0.2.0 - Production
    CORE    10.2.0.2.0      Production
    TNS for HPUX: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
      1  with t
      2  as
      3  (select 1 id, to_date('01.02.2008','dd.mm.yyyy') date_1,
      4                to_date('03.02.2008','dd.mm.yyyy') date_2 from dual union all
      5   select 1,    to_date('03.02.2008','dd.mm.yyyy'),
      6                to_date('04.02.2008','dd.mm.yyyy') from dual union all
      7   select 2,    to_date('05.02.2008','dd.mm.yyyy'),
      8                to_date('06.02.2008','dd.mm.yyyy') from dual union all
      9   select 2,    to_date('01.02.2008','dd.mm.yyyy'),
    10                to_date('05.02.2008','dd.mm.yyyy') from dual
    11  )
    12  select count(case when to_number(date_2 - date_1) <= 2 then 1 end) diff_2,
    13        count(case when to_number(date_2 - date_1) > 2 then 1 end) diff_Greater_2,
    14    1 - (  count(case when to_number(date_2 - date_1) > 2 then 1 end)
    15         / count(case when to_number(date_2 - date_1) <= 2 then 1 end)
    16        ) percent
    17  from t
    18  group by rollup(id)
    19* having grouping_id(id) = 1
    SQL> /
        DIFF_2 DIFF_GREATER_2    PERCENT
             3              1 .666666667It will be always useful if you could post your full oracle version and a sample test data.
    Regards
    Raj

  • Reg Query For Multiple Text Fields

    Hi all
    I am New to this forum..
    I am developing an application for generating reports.
    In my application i have multiple text fields.
    The user might enter any of the textfields or even enter all the fields.
    In those cases how to use the query when some fields are empty??

    Welcome to the forum.
    It always helps to post a small, simplified example of what it is you're trying to achieve.
    (When posting examples, put the {noformat}{noformat} tag before and after the example, so it will get posted formatted on this forum.)
    In those cases how to use the query when some fields are empty??If your textfields serve as parameters/bind variables for you query, then you could use NVL.
    Something like:select ...
    from some_table
    where col1 = nvl(p_col1, col1)
    and col2 = nvl(p_col2, col2)
    And how about wildcards (the '%' or '_' sign), by the way? Are they allowed as well?
    You also might want to read about this approach:
    http://www.oracle.com/technology/oramag/oracle/09-jul/o49asktom.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Reg: Querying Nested table.

    Hi,
    I am facing a problem with querying the Nested table.
    I have created a type
    CREATE OR REPLACE TYPE TY_BOOKS OBJECT(           VC_BOOK_NAME VARCHAR2(64)          );
    CREATE OR REPLACE TYPE NT_TY_BOOKS AS TABLE OF TY_BOOKS;
    I have used this nested table in a table Student.
    CREATE TABLE STUDENT
    ( SID NUMBER(10),
    CL_NT_BOOKS NT_TY_BOOKS)
    NESTED TABLE CL_NT_BOOKS STORE AS CL_NT_BOOKS_TAB;
    The problem is one student can have more than one book. So if I need to select the students who have 'Science' books, i wrote this query.
    SELECT S.SID,B.VC_BOOK_NAME FROM STUDENT S, TABLE(CL_NT_BOOKS) B WHERE B.VC_BOOK_NAME='Science';
    suppose in the table
    SID BOOK_NAME
    1000          CL_NT_BOOKS('Science')
    1001          CL_NT_BOOKS('Maths'),CL_NT_BOOKS('Science')
    This query will return only those student-ids who have only "Science" book not those student-ids who have "Maths" & "Science" books.
    RESULT
    1000          Science
    but not 1001....
    Please can any one send me the select query which can select iteratively for books names which contains more than one value.

    Hmm, mysterious. It works for me on my 9.2.0.6 dB...
    SQL> CREATE OR REPLACE TYPE TY_BOOKS AS  OBJECT( VC_BOOK_NAME VARCHAR2(64) );
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE NT_TY_BOOKS AS TABLE OF TY_BOOKS;
      2  /
    Type created.
    SQL> CREATE TABLE STUDENT
      2  ( SID NUMBER(10),
      3  CL_NT_BOOKS NT_TY_BOOKS)
      4  NESTED TABLE CL_NT_BOOKS STORE AS CL_NT_BOOKS_TAB;
    Table created.
    SQL> INSERT INTO student VALUES (1000, NT_TY_BOOKS(TY_BOOKS('Science')))
      2  /
    1 row created.
    SQL> INSERT INTO student VALUES (1001, NT_TY_BOOKS(TY_BOOKS('Science'),TY_BOOKS('Maths')))
      2  /
    1 row created.
    SQL>
    SQL> SELECT S.SID,B.VC_BOOK_NAME FROM STUDENT S, TABLE(CL_NT_BOOKS) B
      2  WHERE B.VC_BOOK_NAME='Science'
      3  /
           SID VC_BOOK_NAME
          1000 Science
          1001 Science
    SQL> What I suggest is most likely to have happened is that you have added a space or some other non-printing cahracter into the book name when you inserted row 1001. If this is not the case then you'll have to do it again in SQL*Plus, cut teh output and paste it here, so we can see what's going on.
    Cheers, APC

  • Reg Query Optimization - doubts..

    Hi Experts,
    This is related to Blog by Mr Prakash Darji regarding "Query Optimization" posted on Jan 26 2006.In this to optimize query Generation of Report is suggested.
    I tried this, but I am not sure I am analyzing this correctly.
    I collected Stats data before and after Generation of Report.But how to be sure that this is helping me? Did any one has tried this?
    What to look for in Stats Data - duration?
    But duration would not be absolute parameter as there is factor of "Wait Time, User", so duration may depend on this.
    Please help me in this.
    Thanks
    Gaurav
    Message was edited by: Gaurav

    Any ideas Experts?

  • Query about Calendar  usage in sample application

    Hi I’ve been using APEX since a month now and want to make a kind of a scheduling application, some kind of and agenda where u can store events, and associate them to a person, with and specific hour, person in charge, and some other fields.
    Revising the sample application we have a calendar example in the orders tab, on this tab we have the calendar (that I mentioned before) and on the day column we have linked items to a specific page, I would like to know how to do that.
    I looked over the application in the calendars attributes column and day link and apparently there is nothing.
    I will appreciate if someone knows anything about it.
    Best regards.
    Jaison José González Chaux

    Hi everyone,
    </br>
    I’ve been searching around my app and noticed that there is no source tab section on my region definition.
    </br>
    I created a new calendar and even so, it is not created.
    </br>
    I would appreciate if anyone can give me a hind about it.
    </br>
    Best regards.
    </br>
    JJGCH
    </br>
    P.D.: in the aplication theres is a link on that secction
    </br>select '<a title="Order Detail" href="f?p=&APP_ID.:29:' || :APP_SESSION || '::::P29_ORDER_ID:' || order_id || '">' || to_char(order_total, '$999,999') || '</a>
    ' ord, order_timestamp
    from demo_orders o, demo_users u
    where o.user_id = u.user_id and (u.user_name = :APP_USER or :APP_USER = 'ADMIN')

  • Query about calendar entries - Asha 311

    Just purchased an Asha 311 and need some info. about the calendar entries that I made (a To-do list).
    To the right of the entry there appears a gray-scale dot, which, when touched, turns green.  The entry vanishes to the bottom of the list.  Touch the green dot and the entry re-dates itself to two weeks after the original date and re-positions itself accordingly.
    Please let me know the significance of this gray-turned-green icon and how I can prevent my calendar entries vanishing and re-positioning themselves to the wrong dates.
    Thanks in advance.
    CLYDE

    Hi CLYDE1963,
    Welcome to the Nokia Support Discussions!
    This is a normal behavior of the phone. We suggest not to tap the gray-scale dot since it will notify you if you have already set the time and tone for it. If you will do it again, it means that the entry has been finished or has been done.
    Hope this helps. 

  • Reg: Query behavior

    Hi Experts,
    I had the Query - 1 and modified it to Query - 2, but getting a difference in record count.
    Could you please help me understand the below ?
    Query - 1
    SELECT
    exp.inv_no AS inv_no,
    exp.lno  AS lno
    FROM
    SELECT
      table_x.lno,
      table_x.inv_no
    FROM
      table_x table_x
    WHERE
      table_x.repd = '1146'
    ) exp
    LEFT JOIN
    SELECT
      table_m.lno
    FROM
      table_m table_m
    WHERE
      table_m.codex IN ('4174','449','3958','2913','3743','3745','510','3957','2275','3550','3965','3479','3964','2276','3744','447', '3478','2912','3747')
    ) mx
    ON exp.lno = mx.lno;
    -->-- 1560993 records
    | Id  | Operation             | Name               | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT      |                    |      1 |        |     50 |00:00:00.02 |     240 |       |       |          |
    |*  1 |  HASH JOIN RIGHT OUTER|                    |      1 |   1742K|     50 |00:00:00.02 |     240 |  1307K|  1307K| 1877K (0)|
    |   2 |   INLIST ITERATOR     |                    |      1 |        |   9868 |00:00:00.01 |      77 |       |       |          |
    |*  3 |    INDEX RANGE SCAN   | table_m_idx        |     19 |   8712 |   9868 |00:00:00.01 |      77 |       |       |          |
    |*  4 |   INDEX FAST FULL SCAN| table_x_pk         |      1 |   1742K|     50 |00:00:00.01 |     163 |       |       |          |
    Predicate Information (identified by operation id):
       1 - access("lno"="table_m"."lno")
       3 - access(("table_m"."codex"='2275' OR "table_m"."codex"='2276' OR "table_m"."codex"='2912'
                  OR "table_m"."codex"='2913' OR "table_m"."codex"='3478' OR "table_m"."codex"='3479' OR
                  "table_m"."codex"='3550' OR "table_m"."codex"='3743' OR "table_m"."codex"='3744' OR
                  "table_m"."codex"='3745' OR "table_m"."codex"='3747' OR "table_m"."codex"='3957' OR
                  "table_m"."codex"='3958' OR "table_m"."codex"='3964' OR "table_m"."codex"='3965' OR
                  "table_m"."codex"='4174' OR "table_m"."codex"='447' OR "table_m"."codex"='449' OR
                  "table_m"."codex"='510'))
       4 - filter("repd"=1146)
    Query - 2
    SELECT
       table_x.inv_no AS inv_no,
       table_x.lno  AS lno
    FROM
      table_x
    WHERE
    table_x.repd = '1146' and
    EXISTS(
      SELECT 1 FROM table_m
      WHERE
       table_x.lno = table_m.lno and
       table_m.codex IN ('4174','449','3958','2913','3743','3745','510','3957','2275','3550','3965','3479','3964','2276','3744','447', '3478','2912','3747')
    -->-- 1895 records
    | Id  | Operation           | Name               | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT    |                    |      1 |        |     50 |00:00:00.01 |     277 |       |       |          |
    |   1 |  NESTED LOOPS       |                    |      1 |  13052 |     50 |00:00:00.01 |     277 |       |       |          |
    |   2 |   SORT UNIQUE       |                    |      1 |   8712 |     52 |00:00:00.01 |      77 |   619K|   471K|  550K (0)|
    |   3 |    INLIST ITERATOR  |                    |      1 |        |   9868 |00:00:00.01 |      77 |       |       |          |
    |*  4 |     INDEX RANGE SCAN| table_m_idx        |     19 |   8712 |   9868 |00:00:00.01 |      77 |       |       |          |
    |*  5 |   INDEX RANGE SCAN  | table_x_pk         |     52 |      1 |     50 |00:00:00.01 |     200 |       |       |          |
    Predicate Information (identified by operation id):
       4 - access(("table_m"."codex"='2275' OR "table_m"."codex"='2276' OR
                  "table_m"."codex"='2912' OR "table_m"."codex"='2913' OR "table_m"."codex"='3478' OR
                  "table_m"."codex"='3479' OR "table_m"."codex"='3550' OR "table_m"."codex"='3743' OR
                  "table_m"."codex"='3744' OR "table_m"."codex"='3745' OR "table_m"."codex"='3747' OR
                  "table_m"."codex"='3957' OR "table_m"."codex"='3958' OR "table_m"."codex"='3964' OR
                  "table_m"."codex"='3965' OR "table_m"."codex"='4174' OR "table_m"."codex"='447' OR
                  "table_m"."codex"='449' OR "table_m"."codex"='510'))
       5 - access("lno"="table_m"."lno" AND "repd"=1146)
           filter("repd"=1146)
    Am I overlooking something?
    Please help me understand this.
    -- Ranit
    (on Oracle 11.2.0.3.0)

    For a single row in table_x you have multiple row in table_m. In first query as you are joining them both you are doing 1 to many (I guess). But in the second query you are not doing a join but just checking the existence. In the first query you can include the columns from table_m in the SQL projection. But in the second query you cant do that.
    So both the query are not the same they are very different. Here is a simple example
    SQL> create table table_x
      2  (
      3    id integer, name varchar2(10)
      4  );
    Table created.
    SQL> create table table_m
      2  (
      3    id integer, parent_id integer, name varchar2(10)
      4  );
    Table created.
    SQL> insert into table_x values (1, 'karthick');
    1 row created.
    SQL> insert into table_m values (1, 1, 'oracle');
    1 row created.
    SQL> insert into table_m values (2, 1, 'sql');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select x.*
      2    from table_x x
      3    left
      4    join table_m m
      5      on x.id = m.parent_id;
            ID NAME
             1 karthick
             1 karthick
    SQL> select x.*
      2    from table_x x
      3   where exists
      4         (
      5           select 1
      6             from table_m m
      7            where x.id = m.parent_id
      8         );
            ID NAME
             1 karthick
    SQL>

  • Reg: Query is too large

    Dear all,
    I am facing an error when trying to save the query "error: query is too large" and the below is the text help given in the documentation.
    Diagnosis
    Query ZYYYYYYY contains 8192 differing selection cells. However, only 8191 selection cells can be processed in a query.
    Procedure
    Please simplify query definition ZYYYYYYYY.

    Hi,
    this happens when maximum no. of Keyfigures are used in the rows....you might be using only one selection or a formula in the Rows of the query..and still face the same error...this reason behind this is that this selection or forumla inturn has a lot of RKFs or CKFs in it...
    to put it clear, say you use a selection named ZTEST in the rows...and the definition of this selection is something like ZTEST = CKF1CKF2CKF3
    and CKF1 = CKF4CKF5CKF6+CKF7
    and CKF2 = CKF8CKF9CKF10/CKF11
    and CKF3 = CKF12*CKF13
    and further if you see CKF 4, 5...13 will again be a combination of multiple CKFs or RKFs...so this goes on and finally ZTEST becomes indeed very complex and uses more than 8191 selections....
    I hope this is the issue you are facing...
    shamee

Maybe you are looking for

  • Please Help me with the Work Item agent to agent forwarding error

    hi folks , This is the error I am getting when I am trying to forward the work item from agent to agent. "Work item 000000017188: Method SAP_WAPI_FORWARD_WORKITEM not allowed for type F " Please Help in this regards. its Urgent. thanks in advance for

  • Where did autofill go in the new pages program?

    The old version of pages allowed me to input minimal info into a cell (account number in my case) and the program would automatically "auto fill" the remaining info for me saving countless hours of cut and pasting.  Has anyone seen it in the new vers

  • Dynamic Distribution Groups question

    Can I create a dynamic distribution group based on Exchange Custom Attributes, specifically extensionAttribute6? I haven't used dynamic distribution groups yet, but now we have a need.

  • Syntax error in scan+syslog.dat(1)

    Hi, I have repeated errors being logged by one of the SunMC agents on a Solaris 10 system. We are running Agent V4: Nov 17 12:38:19 myserver agent[21172]: syslog Nov 17 12:38:19 agent syntax error in fscan+syslog.dat(1) at token '0' Can someone pleas

  • Dell OMSA ViB Release Date for vSphere 6.0

    Hi, is there any information on release dates for vsphere vib's for vSphere 6 (OMSA 7.4.1 / 8.0.1 / 8.0.2) apart from that... will OMSA 8 be continued in two different development  branches for T430/R430/T530/R530/M630... and T630/R630/R730/R730xd or