How to know the select stmt used in creating a table?

Hi,
If we create a table by selecting some records form another table, can we see the select statement used to create that table.
example: Create table emp2 as select * from emp where deptno=20;
is there any data dictionary table which stores select * from emp where deptno=20
Thanks in advance.
Edited by: 805791 on Jul 28, 2012 9:01 PM

No. The SELECT statement is not associated with the table in the data dictionary.
If the statement was executed recently, you may find the entire CREATE TABLE in the V$SQL view. Or, if you have licensed the AWR, you may find it in the DBA_HIST_SQLTEXT view. But there is no guarantee that the query will be in either view.
Justin
Edited by: Justin Cave on Jul 29, 2012 3:46 AM
Additionally, this question doesn't appear to relate to the Oracle Call Interface so it should probably have been asked in a different forum. The General Questions forum or the SQL and PL/SQL forum would have been more appropriate.

Similar Messages

  • How to know the select statement perfomence

    how to know the select statement perfomence. suppose i have 10 select statements in my program. how will i know which select statement not performance wise poor.

    Go to ST04/
    Click on Detail Analysis menu button.
    Click on the SQL Request button.
    In the pup up give <table name> and execute.
    Then you will get a list of all the programs that have a select on that table.
    Or ST05 transaction t start the trace and run your program .Deactivate the trace in st05 .
    and display the trace.
    Regards,
    Ravi

  • How to find the selected item in alv grid or table control

    can any one tell me please
    how to find the selected item in alv grid or table control

    In table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
    IN PAI
      LOOP AT it_tkhdr.
        FIELD it_tkhdr-sel_row
          MODULE tab_tkhdr_mark ON REQUEST.
      ENDLOOP.
    MODULE tab_tkhdr_mark INPUT.
      MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
    ENDMODULE.                 " tab_tkhdr_mark  INPUT
    here it_TKHDR is internal table sel_row is field for selection
    After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
    regards,
    Gagan

  • How to retrieve the Id I used to create the Icloud environment. Each time I use an Apple identifier, I receive a message like it not the one you used at Icloud creation time

    Hi,
    I defined my Icloud environment some time ago. Unfortunatly, I forgot wich Id I used for it. Now I receive a message like "This is a valid Apple Id, but it is not the Id you used to create your Icloud environment.
    So, my question is: where and how can I either replace my Icloud Id or retrieve it ?
    Thank you for your help ...
    Regards
    By the way, you will probably consider that my English is as bad as a computer translation from French. I would thank you for this evaluation !

    Hi Michael,
    Follow the instructions on this link. Be sure to sign out of your old iCloud account on your computer and your devices before setting up you new one. Then sign on the new iCloud account on your PC and your devices once you have set it up using your new AppleID as the iCloud account:
    http://www.apple.com/icloud/setup/pc.html
    Cheers,
    GB

  • WPF: How to know the selection is come from datagrid or from ListBox?

    Our application has a page which includes DataGrid and ListBox.
    Both ItemSource are binding to PlateCells.
    public ObservableCollection<CellVM> PlateCells
    public class CellVM : BaseViewModel
    public CellVM(int wellNumber)
    WellNumber = wellNumber;
    Row = wellNumber / define.NumberofWellsInRow;
    Col = wellNumber % define.NumberofWellsInRow;
    // row and col are 0-based
    public int WellNumber { get; set; }
    public int Row { get; set; }
    public int Col { get; set; }
    bool _isSelected;
    public bool IsSelected
    get { return _isSelected; }
    set
    _isSelected = value;
    OnPropertyChanged("IsSelected");
    string _sampleId;
    public string SampleId
    { get { return _sampleId; }
    set
    _sampleId = value;
    OnPropertyChanged("SampleId");
    when a cell is selected, the cell will be highlight in both DataGrid and ListBox.
    We also implement SelectAll button for both DataGrid and ListBox.
    And SelectAll is ToggleButton. First time click is select All cells and second time click, it will unselect All cells.
    What we notice when SelectAll button is click, all cells in both DataGrid and List box  are highlight.
    After that click on a grid any cell, all cells becomes unselected in both DataGrid and ListBox.
     We assume this the behavior from DataGrid, after click SelectAll and click any cell in DataGrid will remove all selection and only highlight one cell in the datagrid.
    However, this is behavior does not happen in ListBox. click any cell in ListBox only unselect that cell and not unselect all cells.
    So we need to know click(selection) is coming from DataGrid or ListBox and take different actions.
    How do we know the click is coming from DataGrid or ListBox? Thx!
    JaneC

    >>How do we know the click is coming from DataGrid or ListBox? Thx!
    It depends on where in the code you want to be able to determine this. In the view model class you cannot really know if the user clicked in the ListBox or in the DataGrid because the view model knows nothing (and shouldn't know either) about any of these
    controls. It only exposes a property that may be set from anywhere.
    Handling the GotFocus event for any or each of the controls seems to be a good solution because then you can take the appropriate action depending on which control was focused/clicked.
    You could of course move the code that is being executed when the GotFocus event occurs, i.e. the code in your event handler, from the code-behind of the view to the view model class by using a command in the view model class and then hook up the GotFocus
    event to this command using event triggers:
    <DataGrid>
    <i:Interaction.Triggers>
    <i:EventTrigger EventName="GotFocus" >
    <i:InvokeCommandAction Command="{Binding YourCommand}" />
    </i:EventTrigger>
    </i:Interaction.Triggers>
    </DataGrid>
    How to do this is a topic of its own though. Please refer to my blog post about how to handle events in MVVM for more information:
    http://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/. You will need to reference an assembly that is part of the Expression Blend SDK which you can download from here:
    http://www.microsoft.com/en-us/download/details.aspx?id=10801.
    Anyway, as mentioned, handling the GotFocus event seems like a good idea here since you cannot determine which control that was clicked in the setter of the source property in the view model class.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • How to know the column name using the index name for a particular table

    Hi All,
    I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
    Thanks
    Sudheer

    select *
    from user_ind_columns -- or all_ind_columns
    where table_name = UPPER('&table_name')
    and index_name = UPPER('&index_name');
    Regards
    Arun
    Gurgaon

  • How to know the DB objects using the particular tablespace

    Hi All
    I have tablespace which is used by different database objects.
    I want to know which objects are using that tablespace.
    How can I know this??
    Thanks

    I have tablespace which is used by different database objects.
    I want to know which objects are using that tablespace.
    How can I know this??
    select owner,segment_name,segment_type,tablespace_name from dba_segments where tablespace_name='&TBS';

  • How we know the selected node in a Tree object in a form?

    In a TREE object in forms, how can we know the current selected node by clicking a push button.
    lets say , there are 10 nodes in my tree, and 5th one i selected. But i want to store the selected node in a variable, when i click a button.
    please help
    thanks

    Hello
    I've just notice what might be a bug in Oracle forms because when I have the when-tree-node-selected trigger present for the tree (It does not matter if it executes null or some code), the code in option 1 works fine on a when-button-pressed trigger on a button item. This is what I had done to give you a reply.
    My second option will work because you're populating a parameter with when-tree-node-selected trigger which is then readable form anywhere else in the form. All you add is a check on when-button-pressed. Also for bug handling you need to consider setting the value to null when deselecting. I have this option working currently in one of my applications.
    DECLARE
         num_selected NUMBER;
         htree ITEM;
    curren_node FTREE.NODE;
    BEGIN
    htree := find_item('tree.form_list');
    num_selected := ftree.get_tree_property(htree,ftree.selection_count);
    for j in 1..num_selected
    LOOP
    curren_node := ftree.get_tree_selection(htree,j);
    message('hello :'||ftree.Get_Tree_Node_Property(htree,curren_node,ftree.node_value),acknowledge);
    end loop;
    END;     
    cheers
    Q

  • How to know the Control type using event param???

    Hi,
    I wrote a function on MOUSE OVER EVENT. I called this
    function from a LIST and DATAGRID using addEventListener.
    Now i got a requirement like on event fire.. i wanna alert
    the control type i.e., whether the action fire from LIST or
    DATAGRID. I can create two different function for both LIST and
    DATAGRID. But requirement is like cannot reapeat the code.. code
    minimization.
    Is there any property to know the type of control(Like its
    LIST or DATAGRID) using event parameter??
    Thanks & Regards
    PRatap

    You can try using flash.utils.describeType or
    flash.utils.getQualifiedClassName on event.target property and
    figure out the control type.

  • How to know the tcode by using tdid , tdname , tdobject

    hi friends,
    I know the tdobject, tdname  and tdid how can I know on which tcode this text is maintained .
    points will be rewarded.
    Thanks with advance.
    prasad

    Hi
    There is no such rule to know the tcode with these parameters
    but by the values of the Object and Objectname we will know the tcode
    for example
    if the Object is EKKO and Objectname is a PO number then it becomes the PO header text which belongs to ME21N tcode
    similarly if the Object is EKPO  it is PO item text
    if the object is VBBK then it is the Sales order header text (va01 Tcode)
    see the table STXH for the Std texts with these parameters
    Regards
    Anji

  • How to know the system configuration using Java.

    Hello Everyone,
    I wanna know the system configuration (Hard Disk size,Ram capacity,Processor speed) .Can we know it using Java API? Or else is there any API which makes my life easier?
    Can someone let me know,please?
    All ur answers r most welcome.
    Thanks

    --> provides you with some basic info on os user and os but my best bet is to find a windows system file that maintains this information and then read the data from it
    import com.sun.servicetag.SystemEnvironment;
    SystemEnvironment se = SystemEnvironment.getSystemEnvironment();
            System.out.println(se.getCpuManufacturer());
            System.out.println(se.getHostId());
            System.out.println(se.getHostname());
            System.out.println(se.getOsArchitecture());
            System.out.println(se.getOsName());
            System.out.println(se.getOsVersion());
            System.out.println(se.getSerialNumber());
            System.out.println(se.getSystemModel());
            System.out.println(se.getSystemManufacturer());Edited by: emmanuel.putti on Nov 11, 2008 6:43 AM

  • How to know the size of archived logs created under ASM

    I using Oracle 10g on Linux x86-64.
    I need to ship the archived logs(not the entire directory, only a few) from the Live database to the DR site, so I need an estimate of how much time it will take to ship them across the network ?
    Is there anyway I can know the size of a specific archived log file stored under ASM ?
    We can use du in ASM to know the size of directory but I dont find a command in ASM to get the size of a file ?

    No we are also switching logfiles manually , so the maximum size may not
    have reached.
    What I need is something like ls -l command in the Unix prompt which will
    help us to find the size of the file , a similar command to help us determine
    a size of file in ASM ?What is the objective?
    Anyways, you can get the size of an archived log file by quering V$ARCHIVED_LOG view.
    SQL> select sequence#, name, blocks*block_size from v$archived_log where sequence# > 180;
    SEQUENCE# NAME                                     BLOCKS*BLOCK_SIZE
           182 C:\MYDB\ARCH\ARC00182_0633314306.001             223053312
           181 C:\MYDB\ARCH\ARC00181_0633314306.001             264281600
           183 C:\MYDB\ARCH\ARC00183_0633314306.001              26209280
           184 C:\MYDB\ARCH\ARC00184_0633314306.001                  4096
           185 C:\MYDB\ARCH\ARC00185_0633314306.001                 16384
    SQL>

  • How to find the Acoount Group used while creating the customer master data.

    Hi,
    I am in xd03 mode displaying the customer master data. I want to know the ACCOUNT GROUP which was used while create this customer. How can i find it? Can any one tell me the process to find the account group?
    Thanks in advance.

    Enter the customer number in XD03 and click enter. Once the screen displays the customer name go to dropdown extras--> Administrative Data. This will give you the account group and the creation date of the customer. The same is stored in KNA1- KTOKD.
    Thanks
    Indranil

  • How to catch the delta of generic datasource created on table EBAN?

    Hi Guru,
    I am facing a problem about the delta of generic datasource i created on table EBAN.
    when I convert a PR into PO, this PR was created  several month ago, this PR will not be caught into delta package.
    how to get this PR again after it was converted into a PO?
    many thanks.
    brgds/steve

    hi,
    If you have any fields(calday,timestamp,nemric pointer) in your table , using this fields any one we can enable delta.otherwise one option is there but your table is small valoum of datas.
    first data load(full) r3 to bw side cube,then using open hub service download data from cube to any file (excel ,csv) then r3 side create one table using that flat file, then load download file to r3 new table using (LSMW - tcode r3 side).
    now compare your genric extroction table and new table using ABAP coding , then you have any new record or changed find update new table first then BW side .
    using this type we can enable delta for genric extrocation.
    regards,
    sundar.

  • How to combinate the select options using 'when........(.....or......)  '

    Dears,
    I used select statement like
    select rnn
             pucustctycode
        into table gt_zgrrnnh
             from zgrrnnh
             where rnn           in s_rnn
             and   lrcdate       gt gv_update
             and   deleteind     eq space.
    and
    select rnn
             pucustctycode
      appending table gt_zgrrnnh
             from zgrrnnh
             where rnn           in s_rnn
             and   lrcdate       eq gv_update
             and   lrctime       gt gv_uptime
             and   deleteind     eq space.
    in my program. and now i want to combinate them using just one select.
    and the different select conditions is lrdate and lrtime. and the firest selections has no limit to lrtime, but just limit to lrdate.
    Anyone could help me how to use    select ............when ..........(...........or............)?
    Thanks a lot.
    Julie.

    Change your select query like this:
    Select time also, u have to change your internal table Strucutre.
    SELECT   rnn
                   pucustctycode
                   lrctime
        INTO TABLE gt_zgrrnnh
        FROM zgrrnnh
             WHERE  rnn               IN   s_rnn
             AND      lrcdate         GE  gv_update
             AND      deleteind      EQ  space.
    from this you will all the data irrespective of time , but you have time field in your internal table .
    Now Loop at your internal table and delete those records whoes LRCTIME is less than GV_UPTIME.
    This is one way, i am sure there can be many ways to do this.
    One has to keep trying...
    Let me know ,if you face further issue..
    Regards,
    Mayank

Maybe you are looking for

  • Wk 8 - Video of the week: Improving speed with a B...

    Hi Everyone This weeks video shows you how to fit a BT Accelerator.  Extension wiring around your home can affect your broadband speed. Fitting a BT Accelerator (which you may also have heard called an iPlate) can really help improve it. To view our

  • How to Assign Delimiter in BLS

    Hi, I tried to Load a csv file to xMII.... I followed the steps given in the thread Re:Loading text file to xMII.. I am getting error in the following step: Sequence_3; StringListToXmlParser, Link Expression "YourDelimiter" to String_List_To_Xml_Pars

  • Not  Displaying Options tab while Checking Global Consistancy in OBIEE 11G

    Hi, We recently upgraded from 10G to 11 G . Here When I checked Global Consistency I got some Errors but they are negligible . I need to disable those errors but am not finding that option . Please give me the soln. Thanks in Advance.

  • Lost shared printer in Lion and can't re-install it

    I have a Samsung SCX-3200 printer at home that is connected to a Mac Mini.  When I come home with my Macbook Air running OS Lion I would print to it over Wi-Fi as a shared printer attached to the Mini. A few days ago it stopped being able to print th

  • Can't Get Booted

    My Road Warrior Mac Book has finally taken too much kid handling. Pressing the power button, the hard drive stars clicking. By the sound, it makes several searches. BuzzBuzz,,,, Buzzbuzz Then the light goes on at he monitor screen, and then it blinks