Sql text from statspack tables

Hi,
How can I get sql information from statspack tables stats$sql_text, stats$sql_summarry..?
I tried writting sql but not able to get the proper results, please help.
select b.hash_value hash_value, a.snap_time snap_time, b.module module, b.fetches fetches, b.executions executions,
b.rows_processed rows_processed, b.cpu_time cpu_time, b.elapsed_time elapsed_time from stats$snapshot a,stats$sql_summary b
where a.snap_id=b.snap_id and b.snap_id between 1 and 13
and I need to get the complete stats$sql_text.sql_text in the same query without using any procedure or function..
version is 9.2.0.8.
Thanks
clin

I'd also do this the way MOD says.
But if you are feeling adventurous, you could explore cascading delete. You can specify a primary key with "on delete cascade", which makes referred-to records automatically delete. Google for oracle delete cascade or search your Oracle docs.
I wouldn't do cascading deletes myself, though. For one, I've ran into enough trouble with many "smart" db features when trying to do db administration.

Similar Messages

  • How to pass the text from a table to the field label on the selection scre

    hi guru's
      i have requirement were in i have to pass the text from a table as field label for
       a input field on the selection screen.
      EX:    selection screen  
                (xxxxxxx )  __________   
                field label    
      please help 
    regards,
    vara

    hi all,
    can you please check the code, and suggest am i doing wrong any were.
    types: xtab(200).
    data : ttab type table of xtab,
    w_so type xtab.
    data: routine(32) value 'TEMP_ROUTINE',
    program(8),
    message(128),
    line type i.
    AT SELECTION-SCREEN OUTPUT.
    select field text DATA_ELEMENT from zauthgrptxt into table t_fieldlabel where STARALLOWED EQ c_asteriks.
    DESCRIBE TABLE t_fieldlabel LINES N.
    w_so = 'REPORT ZTEMP_PROGRAM.'.
    append w_so to ttab.
    w_so = 'FORM TEMP_ROUTINE.'.
    append w_so to ttab.
    loop at t_fieldlabel.
    w_field = t_fieldlabel-field.
    CONCATENATE 'SELECT-OPTIONS: ' ' P_' w_field zspace ' FOR ' ' T_FIELDLABEL-' w_field ' NO INTERVALS NO-EXTENTION.' INTO w_so.
    append w_so to ttab.
    endloop.
    w_so = 'ENDFORM.'.
    append w_so to ttab.
    generate subroutine pool ttab name program
    message message
    line line.
    if sy-subrc = 0.
    perform (routine) in program (program).
    else.
    write:/ Message.
    endif.
    The sy-subrc = 4. nothing is coming into 'program' at generate subroutine pool
    very urgent requirement please help
    thanks,
    vara

  • Deleting Text from a Table

    I want to know the shortcut for deleting text from a table on a macbook pro with the latest version of Microsoft Word. I want to keep the table and it's formatting but I want the current information deleted and don't want to have to do this cell by cell. I highlight all the text I want deleted and then.........???????
    Please help, this is very frustrating!!!

    Thanks David! You are the best!

  • How do i delete text from a table cell

    I want to delete text from a cell or table but not the cell or table themselves. How do I do this? The 'delete' function does not work.

    Mac Word 2011. i found the answer: 'fn' (function') key + 'Delete' key. if i had a full desktop keyboard it would be the 'Del' key, NOT the 'Delete' key.

  • How to populate SQL Text in auditing table?

    Hi,
    Only modifying the 'AUDIT_TRAIL' .ora parameter is enough to popoulate SQL text?
    Plz reply,if you have any concerns.
    Thanks,

    Hi,
    >>I gone through few documents to enable SQL_TEXT in audit table,it says Changing the . ora parameter to 'DB_EXTENDED' is enough to populate SQL text.
    That's right. The exact SQL statement executed by the user and the bind variables used with the SQL are collected in the audit trail when the initialization parameter AUDIT_TRAIL is set to DB_EXTENDED. The DB or TRUE value will not populate the SQLTEXT and SQLBIND columns of the AUD$ table.
    Cheers
    Legatti

  • SQL-text from java.sql.PreparedStatement ?

    If I have a java.sql.PreparedStatement object,
    is it somehow possible from that object to retrieve the last SQL-text statement that was executed or that it was associated with?

    I should add that if you're prepared to investigate "manually" then you can poke around in the driver as it does its thing using a debugger. You may well be able to find the string that way, but it's entirely dependent upon the driver implementation.
    Note that because a prepared statement typically represents a compiled object on the server end of the connection, there's no absolute requirement for it to retain this information at all - an identifier value will do just as well!

  • Dynamic SQL select from unknown table until runtime

    I need to do a select from a table that is unknown until runtime. Is there any good examples of this. The Store Procedure will take in the table name and return a row.
    I am not using inline SQL because there is a lot more complexity involved . What I need to do is understand how to reference this unknown table.
    Here is an example of what I have written so far.
    PACKAGE pk_LoadNativeDataItems IS
    PROCEDURE version;
    TYPE RowDataCur IS REF CURSOR;
    PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
    p_how_many_rows_to_fetch IN NUMBER,
    p_row_data OUT RowDataCur);
    PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
    p_how_many_rows_to_fetch IN NUMBER,
    p_table_name IN VARCHAR,
    p_row_data OUT RowDataCur) IS
    BEGIN
    OPEN p_row_data FOR
    SELECT * from ||p_table_name||;
    END pr_LoadNativeDataItems;
    END pk_LoadNativeDataItems;
    Thanks for any help
    Tony

    Here is example for similar question:
    Using variables for tables and columns

  • Copying text from excel table in PDF, pastes rectangle boxes into other programs.

    Adobe acrobat X Std.
    I have a PDF file with text, graphics and an excel table in it.
    I add comments to the PDF file and reprint it to a new PDF file.
    In the new file I cannot select text from the excel table and paste it into anything.
    When I paste into word or other programs I get rectangle boxes.
    If I go to the original PDF I the text copies just fine.
    Any ideas would be great.

    Here is a video!!
    http://www.youtube.com/watch?v=J3CJfBlZuW0
    Adobe illustrator CS3, M/S Excel 2003, HWP 2002(Korean Wordprocess),
    Macro Keyboard, script, Action ...

  • Not like operator not working while matching text from two tables

    Hello  Everyone,
    I want to find the Id from table child where the column name  is not matching with at least first term of column name from parent table.
    I am not getting proper output. can anyone help me.
    Output should be :-->ID 6 & 7
    with child as
    (select 1 id, 'Genentech'  as name from dual union all
    select 2 id, 'Altana Pharma AG'  as name from dual union all
    select 3 id, 'Yamanouchi'  as name from dual union all
    select 4 id, 'Sigma-Tau'  as name from dual union all
    select 5 id, 'Schering-Plough'  as name  from dual union all
    select 6 id, 'Pharma AG'  as name from dual union all
    select 7 id, 'Pfizer'  as name  from dual
    ), parent as
    (select 1 id, 'Genentech number'  as names from dual union all
    select 2 id, 'Altana Pharma AG'  as names from dual union all
    select 3 id, 'AG site/Yamanouchi'  as names from dual union all
    select 4 id, 'sigMa Tau'  as names from dual union all
    select 5 id, 'Schering-Plough'  as names  from dual union all
    select 6 id, 'AG'  as names from dual union all
    select 7 id, 'Inc'  as names  from dual
    select *
    from child a, parent bc
    where a.id=bc.id
    and upper(a.name) not like (bc.names)

    One way:
    WITH child AS
            (SELECT 1 id, 'Genentech' AS name FROM DUAL
             UNION ALL
             SELECT 2 id, 'Altana Pharma AG' AS name FROM DUAL
             UNION ALL
             SELECT 3 id, 'Yamanouchi' AS name FROM DUAL
             UNION ALL
             SELECT 4 id, 'Sigma-Tau' AS name FROM DUAL
             UNION ALL
             SELECT 5 id, 'Schering-Plough' AS name FROM DUAL
             UNION ALL
             SELECT 6 id, 'Pharma AG' AS name FROM DUAL
             UNION ALL
             SELECT 7 id, 'Pfizer' AS name FROM DUAL),
         parent AS
            (SELECT 1 id, 'Genentech number' AS names FROM DUAL
             UNION ALL
             SELECT 2 id, 'Altana Pharma AG' AS names FROM DUAL
             UNION ALL
             SELECT 3 id, 'AG site/Yamanouchi' AS names FROM DUAL
             UNION ALL
             SELECT 4 id, 'sigMa Tau' AS names FROM DUAL
             UNION ALL
             SELECT 5 id, 'Schering-Plough' AS names FROM DUAL
             UNION ALL
             SELECT 6 id, 'AG' AS names FROM DUAL
             UNION ALL
             SELECT 7 id, 'Inc' AS names FROM DUAL)
    SELECT *
      FROM child a, parent bc
    WHERE a.id = bc.id
           AND UPPER (REGEXP_REPLACE (a.name, '[^[:alnum:]]')) NOT LIKE
                  '%' || UPPER (REGEXP_REPLACE (bc.names, '[^[:alnum:]]')) || '%';
    Regexp_replace can be avoided and replaced by translate there if you know for sure what characters you are expecting.
    ID NAME ID_1 NAMES
    1 Genentech 1 Genentech number
    3 Yamanouchi 3 AG site/Yamanouchi
    7 Pfizer 7 Inc
    Cheers,
    Manik.

  • How can I copy text from a table in a format that's readable when I paste it into an internet based data recording system?

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

  • How to get SQL text from dbms_sql cursor ID

    Hello,
    I have a progam using dbms_sql. A cursor is built by dbms_sql.parse (cur_id, v_query, dbms_sql.native);From now on I have only the internal ID cur_id of the cursor. Is there a way to get back the original query the cursor is built from when the cursor is passed to another package?
    Regards
    Marcus

    Oracle provides several views that show part or all of the SQL statement. See your Oracle version# Reference manual for v$sql...
    v$sqltext is one view that displays the full text but the text is contained in multiple rows.
    HTH -- Mark D Powell --

  • Texts from T778W table

    Hi All-
    When I look at the entries of T778W table, I find HTEXT column which shows texts for different categories, whereas the same field doesnt exists in the table. Where from this field can be fetched? Its not there in T778W? Which table will have this field??
    Tx

    Thanks to all of you.
    But in T777W, I dont find any Infotype field. I want to extract the text based on infotype and HILFm fields..is there anyother table??
    Tx

  • Download chinese text from internal table to PC text file

    Hi Experts,
      Iam downloading internal table (which is having records in chinese text) on to PC file. But the iam not getting correct text in the pc file. Iam getting some garbage values text.
    Iam using GUI_download FM to donwload the text.
    Iam using internal table
    Begin of itab occurs 0,
    text type string,
    end of itab.
    and passing paramters.
    Filename
    codepage
    table.
    Can you please tell me how can I achive this and what are the parameter need to pass for this.
    Thank In Advance.

    Hi,
    You can use follwoing  funtion modules instead of GUI_DOWNLOAD. It will be more easier.
    SAP_CONVERT_TO_CSV_FORMAT
    SAP_CONVERT_TO_TEX_FORMAT
    SAP_CONVERT_TO_TXT_FORMAT
    SAP_CONVERT_TO_XLS_FORMAT
    SAP_CONVERT_TO_XML_FORMAT.
    I hope this will help you out.
    Help children of U.N World Food Program by rewarding  points and encourage others to answer your queries.

  • Sql queries from internal tables based on context node

    Hi experts,
    I want to select from my inetrnal table which is based on the context node, the rows which do not appear in another internal table based on the context node.
    I have this data:
    data lt_item_level type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_item_level_cp type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_po_items TYPE table of wd_this->element_po_items INITIAL SIZE 0.
    I want to do this:
    select * into CORRESPONDING FIELDS OF TABLE lt_item_level_cp from lt_item_level WHERE lt_po_items-po_number NE lt_item_level-item_number.
    But i get an error:
    "LT_ITEM_LEVEL" is not defined in the ABAP Dictionary as a table,
    Is there a way to do it with select or should i loop over my internal tables?
    thank u very much!!

    hi,
    You cannot use Select queries on internal table.  do like this :
    loop at itab into wa where wa-F1 NE wa-F2.
    append wa to itab1.
    endloop.
    Here itab1 will have all the records as per your requiement.
    I hope it is clear.
    Edited by: Saurav Mago on Oct 26, 2009 5:37 PM

  • How to get offending SQL-Text from OracleException

    Hi,
    is there a way find out the SQL which was the reason for an OracleException ?
    I try to connect to a Oracle RDB database via ODP.NET and a SQLNET-driver of Oracle RDB. During the connect a "table or view not found" error fires and stops the connect. Up to now i was not able to find out which object is missing here. I tried to use the trace feature but it does not show the SQL used inside the connect...
    Regards
    Andreas

    Hi,
    you are right, this table (view) was missing. I finally sniffered the ethernet to find out what ODP.NET is doing here. I posted the solution for RDB in the thread "Info: how to prepare Oracle RDB for ODP.NET".
    Regards
    Andreas

Maybe you are looking for

  • How to attach two files in the send mail action

    Hi experts I want to attach two files in the send mail action . I tried using ; as a separator but it did not work . Regards, Antonio R . Rubalcaba

  • Why did I lose my printer after Lion update?

    I have updated my MacBook Pro and since this update I have lst the ability to print. I have the printer connected to a Belkin router using wireless. All was fine before the update. I have downloaded the HP driver and still cannot see the printer avai

  • Scheduling period - IP30

    Hi All My scheduling period in maintenance plan is 365 days. I have the monthly plan. I am doing IP30, so that it generates 12 work orders. I am not indending to change anything for the next 10 years in the maintenance plan. My question is will the s

  • How to scale joy stick data

    Hi In my application I am acquiring data from a USB type a joystick. I want to scale these values that i am getting from the joy stick. I could use a linear scale. Is there way to use scaling function with joy stick functions? Thanks.

  • Time capsule not working as wireless router

    I am having trouble with my time capsule working as a wireless router.  It appears in airport utility and the green light is on.  It is backing up my computer which is hardwired with via ethernet.  The network setting is on bridge.  Any thoughts?