Suprising output in v$sqlarea

{\code\}
SQL> show parameter cursor
NAME TYPE VALUE
cursor_sharing string SIMILAR
cursor_space_for_time boolean FALSE
open_cursors integer 300
session_cached_cursors integer 20
SQL> show parameter optimizer_dynamic_sampling
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
SQL> alter session set nls_language=american;
Session altered.
SQL> alter system flush shared_pool;
System altered.
SQL> select hash_value,sql_text,version_count from v$sqlarea
2 where sql_text like 'select count(*) from k%';
no rows selected
SQL> select count(*) from k where id=1;
COUNT(*)
1
SQL> select count(*) from k where id=2;
COUNT(*)
51806
SQL> select hash_value,sql_text,version_count from v$sqlarea
2 where sql_text like 'select count(*) from k%';
HASH_VALUE
SQL_TEXT
VERSION_COUNT
2570880302
select count(*) from k where id=:"SYS_B_0"
2
2570880302
select count(*) from k where id=:"SYS_B_0"
2
HASH_VALUE
SQL_TEXT
VERSION_COUNT
SQL> select count(*) from k where id=3;
COUNT(*)
0
SQL> select hash_value,sql_text,version_count from v$sqlarea
2 where sql_text like 'select count(*) from k%';
HASH_VALUE
SQL_TEXT
VERSION_COUNT
2570880302
select count(*) from k where id=:"SYS_B_0"
3
2570880302
select count(*) from k where id=:"SYS_B_0"
3
HASH_VALUE
SQL_TEXT
VERSION_COUNT
{\code\}
why has two lines in v$sqlarea ????
Edited by: jinyu on Oct 6, 2008 1:41 AM
Edited by: jinyu on Oct 6, 2008 1:43 AM

I guess you have't understood Heman't reply. Similar is an intelligent parameter. It won't just go and pick the cached cursor. Rather than it would check that with a different bind value, do you need to reuse the same cursor or Oracle should create a new one? In your case,though the values are different, 1 & 2 but Oracle is not deeming them for being safe to be shared so its creating multiple cursors.
That's the basic difference of Force and Similar. Force goes for sort of,one-plan-fits-all where as Similar goes for , share-when-safe.
HTH
Aman....

Similar Messages

  • Digital Audio output for W series - Alternatives

    There's a thread talking about the displayport does not have audio-output.  Its true and some people get victimized by ill-trained sales people who think their displayport is standard.  There's no literature on Lenovo website warning users about the audio issue either - such thread is closed with the fact that (some) other manufacturers in the same period does have have audio either and Lenovo think they should be in the same boat.
    Let's not go into the blamish again, but discuss what we can do with existing options with alternative digital audio out and line-in that the W series really really missed.
    We have (1) mini-dock and (2) USB soundcard listed as options
    I currently use a USB DAC (digital to analog) system and it do really good in terms of stereo music enjoyment.  However my particular system does not have digital manupilated sound like 3-D surround or multi-channel output and not suprisely, laptop USB generally produce greater latency than desktop USB ports.
    Besides USB, we have 1394 and express card 34 as expansion options.
    What's your setup for digital audio out?  Anyone know any internal soundcard that fits the slots of Wireless USB/Turbo memory PCI ports that all W-series have?

    Other alternatives include
    I know on mackbooks I've seen firewire used as an input for a Weiss Dac if you're into two channel audio.  Do any reiceivers take firewire as an input for hometheater?  Has anyone tested Firewire outputs on their W series?  I'm told that firewire is sometimes preferable to USB, I'm not sure why this would be, can USB support passthrough of DTS encoded signals?
    In the case that firewire works and you Do not have a firewire source, maybe something like this would be of value  It converts firewire to digital coaxial s/pdif and allows passthrough of DTS and AC3.
    http://www.m-audio.com/images/global/manuals/FireWire-Audiophile_Manual.pdf
    As I'm into audio the critical thing here (and what you're paying for when you purchase blue-ray, is maintaining the digital information from the disk in an unconverted form.  You want a direct bit pass through, and you want as little jitter introduced to the signal as possible.  You most certainly don't want the sound card getting in the way, Digtital to Analog converting and then reverse packaging it up and putting it out over the soundcard digital out.  My problem is I'm not familiar enough with computer audio to know how exactly the sounds is transmitted from your blue ray drive to the digital interface you've chosen.
    Anyone know why USB digital out would not be a prefered method?
    Moderator note; comment removed which contravened forum rules

  • Clarification in V$SQL and V$sqlarea

    Hi Gurus, I have a clarification in V$SQL and V$sqlarea. Is it possible to get the entire set of SQL commands that are executed or run for particular session irrespective of the number of commands that are executed during the session. And can this result be got in a text file.
    thanks in advance.

    Hello,
    with execute dbms_system.set_sql_trace_in_session(session_id, serial_id, {True | False}) you can activate SQL tracing for a specific session. SQL Trace will generate a trace file in udump. With TKPROF you can format the output.
    If you want to trace your session: ALTER SESSION SET SQL_TRACE = TRUE
    regards,
    juergen_klinsmann

  • SQL_FULLTEXT Column of v$sqlarea

    All,
    What do I need to do so that the full text stored in sql_fulltext column of v$sqlarea is displayed.
    At the moment, when I run the following sql:
    select SQL_FULLTEXT from v$sqlarea
    where sql_id='0n6x4f5kaaymb';
    I get the output below:
    SQL_FULLTEXT
    SELECT INSTALLED_APP_ID, ORIGINATED_DATE, APPLICATION_ID, RECEIVED_DATE, EFFECTI
    Thanks in advance
    Baffy

    SQL> select SQL_FULLTEXT from v$sqlarea
    2 where sql_id='2j0qhrtccbz4u'
    3 /
    SQL_FULLTEXT
    SELECT GA.VALUE FROM SYS.SCHEDULER$_GLOBAL_ATTRIBUTE GA, OBJ$ GO WHERE GA.OBJ# =
    SQL> set long 999999999
    SQL> select SQL_FULLTEXT from v$sqlarea
    2 where sql_id='2j0qhrtccbz4u'
    3 /
    SQL_FULLTEXT
    SELECT GA.VALUE FROM SYS.SCHEDULER$_GLOBAL_ATTRIBUTE GA, OBJ$ GO WHERE GA.OBJ# =
    GO.OBJ# AND GO.NAME = 'LOG_HISTORY'

  • Could see pending command in v$sqlarea

    Hello,
    Please see the command and output below :
    SQL> select FIRST_LOAD_TIME,SQL_TEXT from v$sqlarea where users_executing > 0;
    FIRST_LOAD_TIME SQL_TEXT
    2005-11-11/16:45:50 SELECT * FROM ratl_oplog
    2005-11-18/14:44:01 select FIRST_LOAD_TIME,SQL_TEXT from v$sqlarea where users_executing > 0
    The first entry in the output is pending since 11th Nov...and I think this is reulting in performance problems in my database.
    Can somebody suggest some way to solve this issue..??
    Thanks, Rajeev

    Hello,
    first off all have a look at select * from v$session_longops;
    To solve this problem alter system kill session.
    regards,
    juergen_klinsmann

  • Confusion in v$sqlarea

    Hello  Experts ;
    I am testing few things on pl-sql  supplies packages (DBMS_SHARED_POOL.PURGE )
    but i have few doubts please clear my doubt.
    << On Terminal 1  >>
    SQL>desc tab1;
    Name                                      Null?                         Type
    NO                                                                              NUMBER
    NAME                                                                       VARCHAR2(15)
    EMAIL                                                                       VARCHAR2(15)
    CITY                                                                           VARCHAR2(15)
    SQL>select count(*) from tab1;
      COUNT(*)
        300000
    SQL>select  *  from t ab1;
    In  Process
    << On Terminal 2  >>
    SQL. conn /as sysdba
    Connected.
    SQL>select sql_text,address, hash_value, executions, loads, version_count, invalidations, parse_calls  from  v$sqlarea
    where  sql_text ='SELECT * FROM TAB1';
    no  rows  selected
    Why  i did n't get  values  in terminal 2 , when  query running on terminal 1;
    MY DB VRSION IS : 10.2.0.1.0
    Thanks in dvance ..

    @BCV
    i got 268 lines  ..then  i have created spool file .  i am pasting output for  following  query..
    SYS>select * From v$sqlarea
      2  order by FIRST_LOAD_TIME desc;
    SQL_TEXT
    --------------------------------------------------------------------------------SQL_FULLTEXT
    --------------------------------------------------------------------------------SQL_ID        SHARABLE_MEM PERSISTENT_MEM RUNTIME_MEM      SORTS VERSION_COUNT
    LOADED_VERSIONS OPEN_VERSIONS USERS_OPENING    FETCHES EXECUTIONS
    PX_SERVERS_EXECUTIONS END_OF_FETCH_COUNT USERS_EXECUTING      LOADS
    FIRST_LOAD_TIME     INVALIDATIONS PARSE_CALLS DISK_READS DIRECT_WRITES
    BUFFER_GETS APPLICATION_WAIT_TIME CONCURRENCY_WAIT_TIME CLUSTER_WAIT_TIME
    USER_IO_WAIT_TIME PLSQL_EXEC_TIME JAVA_EXEC_TIME ROWS_PROCESSED COMMAND_TYPE
    OPTIMIZER_ OPTIMIZER_COST
    OPTIMIZER_ENV
    --------------------------------------------------------------------------------OPTIMIZER_ENV_HASH_VALUE PARSING_USER_ID PARSING_SCHEMA_ID
    PARSING_SCHEMA_NAME            KEPT_VERSIONS ADDRESS  HASH_VALUE OLD_HASH_VALUE
    PLAN_HASH_VALUE MODULE
    --------------- ----------------------------------------------------------------MODULE_HASH ACTION
    ACTION_HASH SERIALIZABLE_ABORTS
    OUTLINE_CATEGORY                                                   CPU_TIME
    ELAPSED_TIME OUTLINE_SID                              LAST_ACT R
    OBJECT_STATUS       LITERAL_HASH_VALUE LAST_LOAD I CHILD_LATCH
    SQL_PROFILE                                                      PROGRAM_ID
    PROGRAM_LINE# EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE LAST_ACTI
    BIND_DATA
    select * From v$sqlarea order by FIRST_LOAD_TIME desc

  • Converting output of an effect into new path?

    Hi all.
    So I take a square, and then I apply a pucker and bloat to it, to make this interesting shamrock shape. The path remains the same, as a square, but the vector output is changed by the effect into said shamrock.
    My question is this - how do I apply the effect directly to the path. In the above example, the blue path would be underneath the fun shamrock.
    http://i35.photobucket.com/albums/d188/OphidianShenzi/01.jpg
    Often I will edit a shape with multiple effects, eg. first i'll bloat it, then i'll apply some sort of warp. It would be very helpful to be able to effect the path directly at any stage of the effects process, since when you have a shape that's warped heavily and you try and edit the warped area you get a big suprise.
    Suggestions?
    Thank you

    Shenzi,
    I hope you're not trying to follow those instructions exactly as stated. If you:
    Copy (Edit>Copy)
    Hide visibility (Object>Hide Selection)
    Then you will not be able to select Object>Expand Appearance, because nothing will be selected.
    For clarity:
    Live vector Effects really are actual paths. But while still in Illustrator, they are paths that get re-generated on-the-fly each time you modify the original path. When the artwork leaves Illustrator (by exporting or printing), live Effects get "nailed down" to the paths and/or raster objects generated by the Effect.
    The Object>Expand Appearance command is so you can  "nail down" the live effect(s) you've applied to an object to actual paths (or raster objects) while still inside Illustrator.
    Just select the path to which you've applied the Pucker & Bloat Effect. Then select Object>Expand Appearance. The result will be the result of the Pucker & Bloat Effect rendered as an ordinary path; it won't have the "live" effect applied anymore. If you think you might still need to start over, back at the stage at which you still had the live (adjustable) Effect, you can make a duplicate of the object with the Effect applied before Expanding its Appearance, and set it aside for future use. But there's no need to do that if you're already satisfied with the Effect.
    JET

  • V$sqlarea.buffer_gets and v$sqlarea.sorts

    What exactly the meaning of the fields ?
    What conclusion I can get from higher result ?
    v$sqlarea.buffer_gets
    v$sqlarea.sorts
    I seek for more knowledge and deep understanding then the table description
    BUFFER_GETS     NUMBER     Sum of buffer gets over all child cursors
    SORTS     NUMBER     Sum of the number of sorts that were done for all the child cursors
    Thanks

    No, the count is a total count that has happened. See below, I have an 11g (11106) db started and I fired up the query from scott for some data. You can see the counts are increasing all the time.
    Session1 (Sys)
    SQL> select buffer_gets from V$sqlarea where sql_text like 'select * from scott%';
    BUFFER_GETS
             94
    SQL> /
    BUFFER_GETS
            102
    SQL> /
    BUFFER_GETS
            110
    SQL> /
    BUFFER_GETS
            118
    SQL> /
    BUFFER_GETS
            126
    SQL> /
    BUFFER_GETS
            134
    SQL> /
    BUFFER_GETS
            142
    SQL>Session2(Scott)
    sql> select * from scott.emp;
    <output trimmed>
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7782 CLARK MANAGER 7839 09-JUN-81 10
    10
    7876 ADAMS CLERK 7788 23-MAY-87 10
    20
    7900 JAMES CLERK 7698 03-DEC-81 10
    30
    14 rows selected.
    SQL> /
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 10
    20
    So you can't really say that the number can be reduced looking at the number from this view. You need to make the data access lesser so that the number of blocks touched are lesser.
    HTH
    Aman....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I want to output my mbp through my apple tv, is this possible?

    I recently purchased a ATV2 and was hugely suprised to find that outputing from my MBP to it does not seem possible, i have searched for a third party solutions but as yet have not found one. It seems strange that the ipad can produce this feature natively (once ios 5 is released) but there appears to be no mention of lion getting the same feature, any help or gudance would be appreciated, thanks

    apple dont read here this is a user forum if you want their ear
    http://www.apple.com/feedback/appletv.html

  • SQLAR is not a recognized product

    Hi,
    I merged seven patches and then applied it as one patch.
    When I checked log file I found below message.
    =======================================================
    WARNING : 'SQLAR' is not a recognized product.
    The following entry is now disabled.
    exec FND bin FNDLOAD bin &phase=dat checkfile:ar:patch/115/import/US:b8969882.ldt &ui_apps 0 Y upload @SQLAP:patch/115/import/appmtpgm.lct @@SQLAP:patch/115/import/US/b8969882.ldt
    =======================================================
    Please advise.
    Thanks,
    Rushi

    Thanks for responding Hussein.
    Oracle Application release R12.1.3
    Database version : 11.2.0.2.0 EE 64-bit Production
    Os version : Red Hat Enterprise Linux server release 5.9 (Tikanga) 64-bit OS
    I merged following patches
    12958998
    16357135
    11056049
    10030555
    13788010
    16452397
    16201879
    The command that I used for merging was
    admrgpch -s source_gl -d dest_gl -merge_name merge_gl -verbose 3 -logfile merge_gl.log
    Following query for %AP% and %AR% returns this output
    select fa.APPLICATION_SHORT_NAME, fpi.PATCH_LEVEL, DECODE(fpi.STATUS, 'I','Installed',
    'S','Shared', 'N', 'Inactive', fpi.STATUS) Status , fpi.DB_STATUS
    from fnd_product_installations fpi,FND_APPLICATION fa
    where fpi.APPLICATION_ID in (
    select APPLICATION_ID from FND_APPLICATION where APPLICATION_SHORT_NAME like '%AR%')
    and fa.APPLICATION_ID=fpi.APPLICATION_ID;
    APPLICATION_SHORT_NAME                             PATCH_LEVEL                    STATUS    D
    AR                                                 R12.AR.B.3                     Installed I
    APPLICATION_SHORT_NAME                             PATCH_LEVEL                    STATUS    D
    SQLAP                                              R12.AP.B.3                     Installed I
    Please let me know if you need anymore details.
    Thanks,
    Rushi

  • Total is not getting displayed in the ALV output.

    Hi,
    Total is not getting displayed in the ALV output.
    I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
    Are  there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
    source code:
    DATA: layout TYPE slis_layout_alv,
          IT_eventS  TYPE slis_t_event,
          fcat   TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    TYPES: BEGIN OF ty_tab,
          belnr TYPE dberchz-belnr,
          belzart TYPE dberchz-belzart,
          net TYPE dberchz-nettobtr,
          END OF ty_tab.
    DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
    SELECT belnr belzart nettobtr
      FROM dberchz
      INTO TABLE lt_tab[]
    WHERE belnr eq '000000000001'.
      if sy-subrc ne 0.
      ENDIF.
    *  defining layout
    layout-colwidth_optimize = 'X'.
    layout-def_status = 'X'.
    *defning event
    *event
    *defining field catalog
    fcat-col_pos = 1.
    fcat-fieldname = 'BELNR'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 2.
    fcat-fieldname = 'BELZART'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 3.
    fcat-fieldname = 'NET'.
    fcat-tabname  = 'LT_TAB'.
    fcat-do_sum = 'X'.
    APPEND fcat.
    *calling alv
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'YZ_PLR'
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = layout
        it_fieldcat                      = fcat[]
        i_tabname                        = 'LT_TAB'
        it_events                        = IT_EVENTS[]
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      tables
        t_outtab                         = lt_tab[]
    * EXCEPTIONS
    *   PROGRAM_ERROR                    = 1
    *   MAXIMUM_OF_APPENDS_REACHED       = 2
    *   OTHERS                           = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    Thanks,
    Gaurav

    Hi
    No I don't think, this is my code (based on your code) and it works fine:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF LT_TAB OCCURS 0,
           BELNR LIKE BSEG-BELNR,
           GJAHR LIKE BSEG-GJAHR,
           WRBTR LIKE BSEG-WRBTR,
           WAERS LIKE BKPF-WAERS,
          END OF LT_TAB.
    DATA: LAYOUT     TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS  TYPE SLIS_T_EVENT,
          FCAT       TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REC_FCAT   TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    START-OF-SELECTION.
      FCAT-COL_POS       = 1.
      FCAT-FIELDNAME     = 'BELNR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'BELNR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 2.
      FCAT-FIELDNAME     = 'GJAHR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'GJAHR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 3.
      FCAT-FIELDNAME     = 'WRBTR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-CFIELDNAME    = 'WAERS'.
      FCAT-REF_FIELDNAME = 'WRBTR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
      FCAT-COL_POS       = 4.
      FCAT-FIELDNAME     = 'WAERS'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'WAERS'.
      FCAT-REF_TABNAME   = 'BKPF'.
      FCAT-DO_SUM        = SPACE.
      APPEND FCAT.
      SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
        WHERE BUKRS = 'MAAB'
          AND BELNR = '0000000001'.
      LT_TAB-WAERS = 'EUR'.
      MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
    *CALLING ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FCAT[]
          I_TABNAME   = 'LT_TAB'
          IT_EVENTS   = IT_EVENTS[]
        TABLES
          T_OUTTAB    = LT_TAB[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    I've also inserted a currency field
    Max

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • Comas(,) are not getting displayed in the output while using OO ABAP

    Hi All,
    I am using ABAP objects to display the ALV report in which there is a requirement to output Quantity fields. The Quantity fields are getting displayed without comas ','. Please help me in getting back the comas in the output.
    Eg:
    Below logic is used in my program.
    Class name: cl_salv_form_layout_grid
    Code:
      obj_footer->create_text(
            row    = v_row_cnt
            column = v_col_cnt
            text   = Quantity).
    Expected output:
    39,545.000
    Current Output:
    39545.000
    Thanks in advance for your help.
    Thanks & Regards,
    Siva.

    Hi,
    Please check if the images are in the server and in the /images alias path.
    thanks,
    Sharmila

  • Getting null and 0 outputting to screen or file.

    Hi everyone,
    I am trying to make a phone book program in Java. However the main functions of the phone book (adding and displaying contacts) isn't really working, it is outputting null or 0.
    Here is a class to create an object for family members:
    import java.util.StringTokenizer;
    public class phoneFamily extends phoneNumbers
         protected int home;
         public phoneFamily(String name, String address, int mobile, int business, int home)
              super(name, address, mobile, business);
              this.home = home;
         public phoneFamily(StringTokenizer P)
              super(P);
              while (P.hasMoreTokens()){home = Integer.parseInt(P.nextToken());}
         public void setHome(int home)
              this.home = home;
         public int getHome()
              return home;
         public String toString()
              return "Name: " + name + "\nAddress: " + address + "\nMobile: " + mobile +
                   "\nBusiness: " + business + "\nHome: " + home;
         public String CSV()
              return name + "," + address + "," + mobile + "," + business + "," + home;
    }Now I'm assuming that the problem I am having, where null or 0 is written to the file and screen is caused by the methods that reads a contact, writes them to the file, prints them to the screen. Here are those bits of codes.
    Reads Contact:
    private phoneNumbers ReadContact()
              int x = 0;
              String contact;
              StringTokenizer S;
              while (x < 1 || x > 3)
                   System.out.print("Which type of contact would you like?");
                   System.out.print("\n1)Family\n2)Workers\n3)Friends");
                   x = keyboard.nextInt();
              contact = ReadString("contact name") + "," +
                         ReadString("address") + "," +
                         ReadString("mobile") + "," +
                         ReadString("business") + ",";
              if (x==1)
                   contact+=ReadString("home");
              else if (x==2)
                   contact+=ReadString("email") + "," + ReadString("job title") + "," + ReadString("department");
              else
                   contact+=ReadString("email") + "," + ReadString("home");
              S = new StringTokenizer(contact,",");
              if (x==1)
                   return new phoneFamily(S);
              else if (x==2)
                   return new phoneWorkers(S);
              else
                   return new phoneFriends(S);
    Writes to File
    public void Save() throws IOException
              PrintWriter phoneFile = new PrintWriter(new FileOutputStream(PH_FILE));
              for (int i=0;i<NumOfContacts;i++)
                   String phoneX = phone.CSV();
                   phoneFile.println(phoneX);
              phoneFile.close();
              System.out.println("Contacts have been saved successfully.");
    Prints on Screen
    public void PrintFamily()
              System.out.println("Contacts Stored as FAMILY:");
              System.out.println("");
              //#=7, Name=24, Address=28, Email=24, Mobile=12, Business=12,
              System.out.println(SpaceGen("#",7) + SpaceGen("Name",24) + SpaceGen("Address",28) +
                   SpaceGen("Mobile",12) + SpaceGen("Business",12) + SpaceGen("Home",12));
              //System.out.println(RepChar('=',100));
              for (int i=0;i<NumOfContacts;i++)
                   if (phone[i] instanceof phoneFamily)
                        System.out.print(SpaceGen((new Integer(i+1)).toString(),7));
                        System.out.print(SpaceGen(phone.getName(),24));
                        System.out.print(SpaceGen(phone[i].getAddress(),28));
                        System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getMobile()).toString(),12));
                        System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getBusiness()).toString(),12));
                        System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getHome()).toString(),12));
              //System.out.println(RepChar('=',100));
    For some reason the last thing you enter when adding a contact (example above, home number), gets displayed first (when it should be name) and the rest are null or 0. The file looks something like this (in CSV)
    111222333,null,0,0,0
    The "111222333" is supposed to be the name but like I said last value entered is being put first.
    I've gone over my code several times, with no luck :-(.

    I made a silly mistake in the bit where the details are read. After fixing that everything is running well :-).
    My mistake:
    I had something like:
    while(P.hasMoreTokens()){this.data = P.nextToken();}
    while(P.hasMoreTokens()){this.data2 = P.nextToken();}
    and so on...Obviously had to use "if"s and not "while"s to read the data...
    Thanks for offering a helping hand :-) though!

  • Help! No output!

    Hi there,
    Im using an MAudio Firewire interface and I've got it set to use the aggregate device so I can use my MacBook soundcard as an input and an output.
    I can hear any tracks I create fine but 'system' sounds like previewing loops, metronome, and count ins are not coming through, I guess this is down to the way the aggregate device works.
    My Inputs are set to channel 2, and outputs 5-6.
    Is there any way to fix this, or how do I set this up to work correctly?
    Thanks
    Tom

    Clicks and loops come through their own channel strips, and they're probably set to 1-2. Go into the Mixer, and click the 'All' tab top right. There should be a 'Prelisten' channel strip there for your loops and Sample Editor sounds, and a 'Click' channel strip, which is set to Instrument 256. Change them both to output 5-6 (or whatever output) and you should be all set.

Maybe you are looking for