How to find last accessed/updated tables and the query text?

I am using :
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
How to find last accessed/updated tables and the query text?
Regards
LEE1212

Check DBA_TBALES view there you find one date column that indicate last update
One option is as follows:
(1) Turn the auditing on: AUDIT_TRAIL = true in init.ora
(2) Restart the instance if its running.
(3) Audit the table:
     AUDIT INSERT,SELECT,DELETE,UPDATE on TableName
     by ACCESS WHENEVER SUCCESSFUL
(4) Get the desired information using :
     SELECT OBJ_NAME,ACTION_NAME ,to_char(timestamp,'dd/mm/yyyy , HH:MM:SS')
     from sys.dba_audit_object.
Cheer,
Virag Sharma
http://virag.sharma.googlepages.com/
http://viragsharma.blogspot.com/
Message was edited by:
virag_sh

Similar Messages

  • How to find schema of a table and a view

    Hi,
    I have an old form which uses one table and one view. I know its database. Now I'm making another form in some other database and want to use the old form but for that I need to know the schema of that table and the view so that I can give the schema name and db link to connect (meaning schema.table_name@dbname). How do I find out the schema for that table and view.
    I did a search by using "select owner from all_objects where object_name = tablen" and it says PUBLIC. There's no schema called Public. I can see Public Synonyms but cannot find that table and view in it. So please help. I'm trying since long to find its schema.
    Thanks.

    Hi ,
    Isn't it peculiar that i have declared a public synonym on table BIOGR as user523269 does.... and the sql statement:
    select owner from all_objects where object_name='BIOGR' works.... whereas of user523269 does not...?????
    SQL> select * from dba_synonyms where table_name='BIOGR';
    OWNER                          SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME                     DB_LINK
    PUBLIC                         BIOGR                          HIS                            BIOGR Regards,
    Simon

  • Using CS_BOM_EXPL_MAT_V2 how to find last children of material in the bom.

    Hi,
    I want to find last children of a material.I am using FM CS_BOM_EXPL_MAT_V2. Although STPOX internal table as STUFE for level but we can't get all the last child of material directly.
    For example material A as child A1 and A2 this sub divided into A1- A11, A12 and A2 - A21 , A22 and again A21 -A211,A212 and A22 - A221,A222
    so the last children are A11,A12,A211,A212,A221,A222. So if we use max of STUFE it will omit A11 and A12.Do i need to program a custom logic to get last child using Stufe and WEGXX or is there any other method available to get Last Children of the Material or is there any other Function module to get the Last child of the material.
    Thanks in Advance.

    You will have to write your own custom logic after calling the function module.  In my case, it is easy, because the lowest level materials will always be raw materials(material type ZROH) as opposed to a semi-finished material(material type HALB).  Your's may be different.
    REgards,
    Rich Heilman

  • How to find all ORA error code and the message in Oracle10g?

    Does anyone knows how to list all ORA error code and message in SQL Plus or find a full list of ORA error code in documentation?

    If you want ALL Oracle ORA error codes in single page or even downloadable (html or pdf format) then check following post.
    http://www.oratraining.com/blog/2010/08/complete-list-of-all-oracle-ora-errors/
    Regards,
    Tushar
    Edited by: oratraining on Aug 18, 2010 12:20 AM

  • How to display last data update date and time in report?

    Hai All,
               I want to report the date and time of the last upload in a report. How can I do this?
    I mean if I load the data today 5th April 2006 at 8.30 pm, then would i be able to show that on my report at the top of it(along with filer objects may be)?
    Thank you.

    Hi Visu,
    You will find detail info from help.sap
    check the links and they are  useful
    BEX Analyzer:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    Web Application Designer
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    -Doodle
    Message was edited by: Doodle

  • How do I restrict access by domain and the rest of the world to the documents in the public_html folder in iPlanet Portal Server?

    Hello,
    We have multiple domains configured in our iPlanet Portal Server 3 demo environment. In addition we are using the gateway.
    In one of these domains the userTemplate.html file is tailored to display Macromedia Flash components at dynamic positions on the page. The logical home for these Flash components (since the portal software cannot find them if we simply store them in iwtDesktop) is somewhere below the /opt/SUNWips/public_html directory.
    The problem is that once the file is stored here I can access it if I know the url (http://server:8080/file_path) without being authenticated in the domain.
    The allow/deny url policy settings are specific to a domain and seem to have no affect on the rest of the world.
    Any advice you can provide is greatly appreciated.
    Thanks!

    Joel,
    If your intent is to block access to the doc root, you can probably use access control lists (acl) to prevent anyone from accessing the files stored under public_html. You can get more information about how to create ACLs from the following URL
    http://docs.iplanet.com/docs/manuals/enterprise/41/ag/esaccess.htm#1005439
    You can even set up Basic Authentication for access to the direcory or ip based access or any which way you want. I've personally never blocked access to the doc root in portal, so I am not sure what the impact will be.
    Hope this helps!

  • How to find colums in CLOB variable and get this colums value to update col

    Question
    How to find colums in CLOB variable and get this colums value to update colum of oracle database table
    How my work will go
    Step-1 - I am creating XML FIle which is based on code that we discused before-
    Its developing xml file with data in <...inputelement> as u can see in my xml but in <..output> Element of xml its just have all column for exampe <itemoutput>
    <FLD NM = "ABC"> 0 </FLD>
    <FLD NM = "XYZ:> </FLD> --- for varchar2
    </itemoutput>
    In 1st stage i am just generating <..INPUT> with its colums and real value from database and <..output> elements will go zero value but with colums name.
    Note. I create temp table will all COLUMN which u can see in both in <..ITEMINPUT> and <..ITEMOUTPUT>
    Step2.. After Generaing my xml i want to convert my xml data into CLOB not in a file. so clob will go to the VENDOR
    STEP3.
    I will Recieved again xml data in CLOB from the vendo in <.OUTPUT> ELEMents
    for example
    I send this format
    <itemoutput>
    <FLD NM = "ABC"> 0 </FLD>
    <FLD NM = "XYZ:> </FLD> --- for varchar2
    </itemoutput>
    And i will receive it
    <itemoutput>
    <FLD NM = "ABC VALUE"> 2 </FLD>
    <FLD NM = "XYZ TYPE:> SUV</FLD> --- for varchar2
    </itemoutput>
    So will take this output valu from xml clob and will update my staging table .
    Which have the same colum name as its look in xml clob.
    Step- 4. I will take this value from staging table and update my original oracle database table. which i send you before.
    But u leave this step becaue you dont know the staging table colum maping with original table.
    I think now you understand
    Please feed back
    monriz

    here is my xml..
    I want to extract <..output> elements which enclosed with " " and its values from this xml file. please any body have any idea. please tell me
    Thanks
    <?xml version="1.0" ?>
    - <RATABASECALC COPYRIGHT="COPYRIGHT 2001>
    - <RATEREQUEST USEREFID="YES">
    - <ANCHOR>
    <DATABASENAME />
    <DATABASEPW />
    <DATABASESOURCE />
    <DATABASEPRVDR />
    <USERNAME />
    <SEVERITYDES />
    <CALLDES />
    <INITACCDES />
    <INITACCV />
    <ITEMSEQDES />
    <ITEMMATCHDES />
    <CENTURYDES />
    <DATEDES />
    <FORMULADES />
    <STRINGDES />
    <VALIDATIONDES />
    <STEPSDES />
    <RETINFONUM />
    <ADDLRETINFONUM />
    <ANCHORNOMATCH />
    <NOMATCHMSG />
    <TRANUUID />
    <LOGOPTION />
    <MSGOPTION />
    <USERLOGFN />
    <NOITEMERROR />
    <LOGFORMAT />
    <LOGFN />
    <STEPSFN />
    <NUMNOMATCH>0</NUMNOMATCH>
    <NUMERRORS>0</NUMERRORS>
    </ANCHOR>
    - <POLICIES>
    - <POLICY>
    <BUSINESSDES>N</BUSINESSDES>
    <LEGALENTITYOWNER>CGI TRAINING AND DEMONSTRATION</LEGALENTITYOWNER>
    <LEGALENTITYNAME>CGI TRAINING AND DEMONSTRATION</LEGALENTITYNAME>
    <COMPEFFDATE>02/01/2000</COMPEFFDATE>
    <RETRIEVALDATE>02/01/2000</RETRIEVALDATE>
    <POLINPUTS />
    - <POLOUTPUTS>
    <FLD NM="POLICY CALCS DONE IND">Y</FLD>
    <FLD NM="TOTAL DISCOUNTED POLICY PREM">2167.52</FLD>
    <FLD NM="TOTAL POLICY PREMIUM">3180.0</FLD>
    </POLOUTPUTS>
    - <LOBS>
    - <LOB>
    <LEGALENTITYPRODGROUP>PERSONAL AUTOMOBILE</LEGALENTITYPRODGROUP>
    - <LOBINPUTS>
    <FLD NM="MULTI-CAR FACTOR">0</FLD>
    <FLD NM="MULTI-CAR IND">Y</FLD>
    </LOBINPUTS>
    <LOBOUTPUTS />
    - <REGIONS>
    - <REGION>
    <LEGALENTITYREGION>MAINE</LEGALENTITYREGION>
    - <REGIONINPUTS>
    <FLD NM="STATE PREMIUM AMOUNT">0</FLD>
    </REGIONINPUTS>
    - <REGIONOUTPUTS>
    <FLD NM="TOTAL STATE PREMIUM">2356.0</FLD>
    <FLD NM="TOTAL DISCOUNTED STATE PREM">2167.52</FLD>
    <FLD NM="TOTAL STATE DISCOUNT AMOUNT">188.48</FLD>
    </REGIONOUTPUTS>
    - <REGIONERRORS>
    <NUMLOGENTRIES>3</NUMLOGENTRIES>
    <NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
    </REGIONERRORS>
    - <COVERAGES>
    - <COVERAGE RBID="COVP1L1R1C1">
    <COVFORMULAINDEX FORMREF="FMLAP1L1R1F1" />
    <COVINPUTS />
    - <COVOUTPUTS>
    <FLD NM="DEDUCTIBLE BUYBACK">145.0</FLD>
    </COVOUTPUTS>
    <COVCONTROL />
    </COVERAGE>
    - <COVERAGE RBID="COVP1L1R1C2">
    <COVFORMULAINDEX FORMREF="FMLAP1L1R1F2" />
    <COVINPUTS />
    - <COVOUTPUTS>
    <FLD NM="DEDUCTIBLE BUYBACK">209.0</FLD>
    </COVOUTPUTS>
    <COVCONTROL />
    </COVERAGE>
    - <COVERAGE RBID="COVP1L1R1C3">
    <COVFORMULAINDEX FORMREF="FMLAP1L1R1F3" />
    <COVINPUTS />
    <COVOUTPUTS />
    <COVCONTROL />
    </COVERAGE>
    </COVERAGES>
    - <ITEMS>
    - <ITEM>
    - <ITEMINPUTS>
    <FLD NM="COLLISION DEDUCTIBLE">100</FLD>
    <FLD NM="COMP DEDUCTIBLE">FULL</FLD>
    <FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
    <FLD NM="LIABILITY LIMIT">100</FLD>
    <FLD NM="SYMBOL">15</FLD>
    <FLD NM="TOWING INDICATOR">Y</FLD>
    <FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
    <FLD NM="VEHICLE SYMBOL">0</FLD>
    <FLD NM="MODEL YEAR">1997</FLD>
    <FLD NM="COST NEW">0</FLD>
    <FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
    <FLD NM="GOOD STUDENT IND">N</FLD>
    <FLD NM="CLASS CODE">11</FLD>
    <FLD NM="COLL RATE">0</FLD>
    <FLD NM="TERRITORY">001</FLD>
    <FLD NM="COMP RATE">0</FLD>
    <FLD NM="PROTECTIVE DEVICE CODE">B</FLD>
    <FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
    <FLD NM="MED RATE">0</FLD>
    <FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
    <FLD NM="PASSIVE RESTRAINT CODE">A</FLD>
    <FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
    </ITEMINPUTS>
    - <ITEMOUTPUTS>
    <FLD NM="CLASS FACTOR">0.84</FLD>
    <FLD NM="TOTAL VEHICLE PREMIUM">1166.0</FLD>
    <FLD NM="TOTAL COLLISION PREMIUM">438</FLD>
    <FLD NM="TOTAL COMP PREMIUM">218</FLD>
    <FLD NM="TOTAL LIABILITY PREMIUM">475</FLD>
    <FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
    <FLD NM="TOTAL TOWING PREMIUM">4</FLD>
    <FLD NM="TOTAL UM PREMIUM">27</FLD>
    </ITEMOUTPUTS>
    - <ITEMNOMATCHES>
    <ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
    <ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
    </ITEMNOMATCHES>
    - <ITEMCOVINDEXES>
    <ITEMCOVINDEX COVREF="COVP1L1R1C1" />
    </ITEMCOVINDEXES>
    <ITEMCONTROL />
    </ITEM>
    - <ITEM>
    - <ITEMINPUTS>
    <FLD NM="COLLISION DEDUCTIBLE">50</FLD>
    <FLD NM="COMP DEDUCTIBLE">FULL</FLD>
    <FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
    <FLD NM="LIABILITY LIMIT">100</FLD>
    <FLD NM="SYMBOL">12</FLD>
    <FLD NM="TOWING INDICATOR">N</FLD>
    <FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
    <FLD NM="VEHICLE SYMBOL">0</FLD>
    <FLD NM="MODEL YEAR">1997</FLD>
    <FLD NM="COST NEW">0</FLD>
    <FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
    <FLD NM="GOOD STUDENT IND">N</FLD>
    <FLD NM="CLASS CODE">12</FLD>
    <FLD NM="COLL RATE">0</FLD>
    <FLD NM="TERRITORY">001</FLD>
    <FLD NM="COMP RATE">0</FLD>
    <FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
    <FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
    <FLD NM="MED RATE">0</FLD>
    <FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
    <FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
    <FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
    </ITEMINPUTS>
    - <ITEMOUTPUTS>
    <FLD NM="CLASS FACTOR">0.88</FLD>
    <FLD NM="TOTAL VEHICLE PREMIUM">1190.0</FLD>
    <FLD NM="TOTAL COLLISION PREMIUM">468</FLD>
    <FLD NM="TOTAL COMP PREMIUM">194</FLD>
    <FLD NM="TOTAL LIABILITY PREMIUM">497</FLD>
    <FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
    <FLD NM="TOTAL TOWING PREMIUM">0</FLD>
    <FLD NM="TOTAL UM PREMIUM">27</FLD>
    </ITEMOUTPUTS>
    - <ITEMNOMATCHES>
    <ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
    <ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
    </ITEMNOMATCHES>
    - <ITEMCOVINDEXES>
    <ITEMCOVINDEX COVREF="COVP1L1R1C2" />
    </ITEMCOVINDEXES>
    <ITEMCONTROL />
    </ITEM>
    - <ITEM>
    <ITEMINPUTS />
    <ITEMOUTPUTS />
    - <ITEMNOMATCHES>
    <ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
    <ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
    </ITEMNOMATCHES>
    - <ITEMCOVINDEXES>
    <ITEMCOVINDEX COVREF="COVP1L1R1C3" />
    </ITEMCOVINDEXES>
    <ITEMCONTROL />
    </ITEM>
    </ITEMS>
    - <FORMULAS>
    - <FORMULA RBID="FMLAP1L1R1F1">
    <FORMULANAME>RATING MASTER</FORMULANAME>
    <FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
    <FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
    <FORMULANEWRENDES>N</FORMULANEWRENDES>
    <FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
    <FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
    <FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
    </FORMULA>
    - <FORMULA RBID="FMLAP1L1R1F2">
    <FORMULANAME>RATING MASTER</FORMULANAME>
    <FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
    <FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
    <FORMULANEWRENDES>N</FORMULANEWRENDES>
    <FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
    <FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
    <FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
    </FORMULA>
    - <FORMULA RBID="FMLAP1L1R1F3">
    <FORMULANAME>PREMIUM DISCOUNT</FORMULANAME>
    <FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
    <FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
    <FORMULANEWRENDES>N</FORMULANEWRENDES>
    <FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
    <FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
    <FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
    </FORMULA>
    </FORMULAS>
    <REGIONCONTROL />
    </REGION>
    - <REGION>
    <LEGALENTITYREGION>NEW HAMPSHIRE</LEGALENTITYREGION>
    - <REGIONINPUTS>
    <FLD NM="STATE PREMIUM AMOUNT">0</FLD>
    </REGIONINPUTS>
    - <REGIONOUTPUTS>
    <FLD NM="TOTAL STATE PREMIUM">824.0</FLD>
    <FLD NM="TOTAL DISCOUNTED STATE PREM">0</FLD>
    <FLD NM="TOTAL STATE DISCOUNT AMOUNT">0</FLD>
    </REGIONOUTPUTS>
    - <REGIONERRORS>
    <NUMLOGENTRIES>2</NUMLOGENTRIES>
    <NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
    </REGIONERRORS>
    - <COVERAGES>
    - <COVERAGE RBID="COVP1L1R2C1">
    <COVFORMULAINDEX FORMREF="FMLAP1L1R1F4" />
    <COVINPUTS />
    - <COVOUTPUTS>
    <FLD NM="DEDUCTIBLE BUYBACK">0.0</FLD>
    </COVOUTPUTS>
    <COVCONTROL />
    </COVERAGE>
    </COVERAGES>
    - <ITEMS>
    - <ITEM>
    - <ITEMINPUTS>
    <FLD NM="COLLISION DEDUCTIBLE">500</FLD>
    <FLD NM="COMP DEDUCTIBLE">250</FLD>
    <FLD NM="INEXPERIENCED OPERATOR IND">Y</FLD>
    <FLD NM="LIABILITY LIMIT">100</FLD>
    <FLD NM="SYMBOL">11</FLD>
    <FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
    <FLD NM="VEHICLE SYMBOL">0</FLD>
    <FLD NM="MODEL YEAR">1996</FLD>
    <FLD NM="COST NEW">0</FLD>
    <FLD NM="DRIVER TRAINING INDICATOR">Y</FLD>
    <FLD NM="GOOD STUDENT IND">Y</FLD>
    <FLD NM="CLASS CODE">36</FLD>
    <FLD NM="COLL RATE">0</FLD>
    <FLD NM="TERRITORY">001</FLD>
    <FLD NM="COMP RATE">0</FLD>
    <FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
    <FLD NM="ANTI LOCK BRAKE IND">0</FLD>
    <FLD NM="MED RATE">0</FLD>
    <FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
    <FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
    <FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
    </ITEMINPUTS>
    - <ITEMOUTPUTS>
    <FLD NM="CLASS FACTOR">1.11</FLD>
    <FLD NM="TOTAL VEHICLE PREMIUM">824.0</FLD>
    <FLD NM="TOTAL COLLISION PREMIUM">332</FLD>
    <FLD NM="TOTAL COMP PREMIUM">123</FLD>
    <FLD NM="TOTAL LIABILITY PREMIUM">334</FLD>
    <FLD NM="TOTAL MEDICAL PREMIUM">8</FLD>
    <FLD NM="TOTAL UM PREMIUM">27</FLD>
    </ITEMOUTPUTS>
    - <ITEMNOMATCHES>
    <ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
    <ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
    </ITEMNOMATCHES>
    - <ITEMCOVINDEXES>
    <ITEMCOVINDEX COVREF="COVP1L1R2C1" />
    </ITEMCOVINDEXES>
    <ITEMCONTROL />
    </ITEM>
    </ITEMS>
    - <FORMULAS>
    - <FORMULA RBID="FMLAP1L1R1F4">
    <FORMULANAME>RATING MASTER</FORMULANAME>
    <FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
    <FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
    <FORMULANEWRENDES>N</FORMULANEWRENDES>
    <FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
    <FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
    <FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
    </FORMULA>
    </FORMULAS>
    <REGIONCONTROL />
    </REGION>
    </REGIONS>
    </LOB>
    </LOBS>
    - <RETINFOS>
    <TOTALRI>0</TOTALRI>
    </RETINFOS>
    </POLICY>
    </POLICIES>
    </RATEREQUEST>
    </RATABASECALC>
    Above xml data - some <...OUTPUT> elements has some FLD elements. and i want to take those outputelemt's FLD Elements data and update my oracle tables.
    Note: FLD = "Attribie" are the colums name of the tables
    back to top

  • How to find last inserted record in the table.

    Version: Oracle 10g
    I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
    How to find last inserted record in the table "Manufacture".
    As i come to know that Rowid is not result perfect results. Please provide your inputs.

    user13416294 wrote:
    Version: Oracle 10gThat is not a version. That is a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
    I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
    How to find last inserted record in the table "Manufacture".Not possible as your data model does not cater for it. That simple.
    If there is a need to determine some order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or more attributes are needed to represent that information. Thus your data model in this case is unable to meet your requirements.
    If the requirements are valid, fix the data model. In other words - your question has nothing to do with Oracle and nothing to do with rowid, rowscn or other pseudo columns in Oracle. It is a pure data modeling issue. Nothing more.

  • How to find index name with primarykey and column on a table?

    Hi,
    how to find index name with primarykey and column on a table?
    please help me.
    Thankyou.

      1  select ac.table_name, ac.index_name, aic.column_name
      2  from user_constraints ac, user_ind_columns aic
      3  where ac.constraint_type = 'P'
      4   and  ac.index_name = aic.index_name
      5* order by 1,2,3
    SQL> /
    TABLE_NAME                 INDEX_NAME                COLUMN_NAME
    ACTION_TABLE                 SYS_C0011033                NESTED_TABLE_ID
    ACTION_TABLE                 SYS_C0011033                SYS_NC_ARRAY_INDEX$
    CATEGORIES_TAB                 SYS_C0011038                CATEGORY_ID
    CUSTOMERS                 CUSTOMERS_PK                CUSTOMER_ID
    INVENTORIES                 INVENTORY_IX                PRODUCT_ID
    INVENTORIES                 INVENTORY_IX                WAREHOUSE_ID
    LINEITEM_TABLE                 SYS_C0011034                NESTED_TABLE_ID
    LINEITEM_TABLE                 SYS_C0011034                SYS_NC_ARRAY_INDEX$
    ORDERS                      ORDER_PK                 ORDER_ID
    ORDER_ITEMS                 ORDER_ITEMS_PK                LINE_ITEM_ID
    ORDER_ITEMS                 ORDER_ITEMS_PK                ORDER_ID
    PRODUCT_DESCRIPTIONS            PRD_DESC_PK                LANGUAGE_ID
    PRODUCT_DESCRIPTIONS            PRD_DESC_PK                PRODUCT_ID
    PRODUCT_INFORMATION            PRODUCT_INFORMATION_PK           PRODUCT_ID
    PROMOTIONS                 PROMO_ID_PK                PROMO_ID
    WAREHOUSES                 WAREHOUSES_PK                WAREHOUSE_ID
    16 rows selected.

  • How to find last executed query on database and or schema.

    hi,
    how to find last executed query on database and or schema.
    yours sincerely

    Sessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
    Try :
    select * from v$session;
    Regards..

  • I lost my Iphone 5 today in Johor Bahru. Not install Find my Phone/Icloud/Offline. How to prevent others access my email and data ? Or how to remote lost mode/locking phone ?

    I lost my Iphone 5 today in Johor Bahru. Not install Find my Phone/Icloud/Offline. How to prevent others access my email and data ? Or how to remote lost mode/locking phone ?

    suyantosdf wrote:
    I lost my Iphone 5 today in Johor Bahru. Not install Find my Phone/Icloud/Offline. How to prevent others access my email and data ? Or how to remote lost mode/locking phone ?
    If you didn't enable find my iphone in icloud settings on your phone, then you can't do a lost mode or lock your phone.
    I would assume you had a passcode on your phone to lock it.  If you didn't then start changing your passwords.
    Report the lost to your phone carrier - local authorities.

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • How to know last access date for the schema's

    Dear all,
    could u plz tell me How to know last access date for the schema’s
    Regards,
    Srinivasa rao.P

    Srinivas,
    could u plz tell me How to know last access date for the schema’s
    In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
    Aman....

  • How to find last DML operation in oracle ADF

    how to find last DML operation in oracle ADF
    Please help me
    Thanks
    Damby

    In the base EntityIml class, just override doDML() method as I said.
    (see http://docs.oracle.com/cd/E16162_01/web.1112/e16182/appendix_mostcommon.htm
    "Methods for Creating Your Own Layer of Framework Base Classes")
    So, put a some flag in the session.
    You should not call doDML() method in backing bean, it will be called by framework.
    In the backing bean, you only have to get that information from the session, as follows:
    String last_dml_op = (String)ADFContext.getCurrent().getSessionScope().get("last_dml_op");And voila...

  • How to find row changes in table

    How can we find row changes in table and i want o find out any significant change in the row information in 11g db.

    hi thanks for ur help
    but i had one more problem
    already i tried this one
    at particular time i am getting that record
    ........................ col1 col2 col3 col4 col5
    3/17/2012 11:55 AM 10 20 30 40 50
    3/17/2012 12:00 PM 0 0 0 0 0
    3/17/2012 12:05 PM 12 22 32 42 52
    see here at 12:00 PM i got the null or zero values.so instead of null values i need consecutive record means below row like 12:05 row values i need
    output is:
    .......................... col1 col2 col3 col4 col5
    3/17/2012 11:55 AM 10 20 30 40 50
    3/17/2012 12:00 PM 12 22 32 42 52
    3/17/2012 12:05 PM 12 22 32 42 52
    its very urgent plz help to me.
    Edited by: 913672 on Mar 17, 2012 6:35 AM
    Edited by: 913672 on Mar 17, 2012 6:36 AM
    Edited by: 913672 on Mar 17, 2012 6:36 AM

Maybe you are looking for

  • Vendor Payment-Cheque Assignment Issue

    Hi, I am facing one of the issue related to vendor payment. Issue description is as below. 1. We do have weekly payment parameter creation (F110) and one of the parameter was created on Wednesday. 2. Another job use to run for that parameter (where v

  • I need to revert back to Firefox 3.6 The new version is not compatible with my Speedlings program. How can I get a 3.6 copy of Firefox? Thanks! Russ

    I originally had Firefox 3.6 and my Speedlings program was working fine with it. Then I updated to 4.0 and Speedlings is not functioning properly. I called Speedlings and they said to use the Firefox 3.6 version and I would be fine.

  • DR Server problem

    Dear All, We have SAP on Oracle 9i. There is also a DRServer on our remote site. I that i have restore whole database offline backup from my production server. Now i want to know that .. 1. where i can find the latest log of restore. 2. In that DR se

  • Mini or others?

    I have been using MacTowerG4 (PowerPC) and started having problems (some we pages cannot be opned becuase I do not have an updated version of plug-in).  I am thinking to purchse a replacement.  Candidates are mini or iMac.  Becuase I have a Cinema Di

  • "Edit In" problem

    ...I'm doing alot of work utilizing external editors out of LR, one of which is, of course, Photoshop.  Everything's been pretty sweet, only today I discovered a problema; using the menu option "Edit a Copy with Lightroom Adjustments" the image in PS