How to generate the insert script of the  tables data present  in an entire

How to generate the insert script of the tables data present in an entire schema in sqlplus environment
with out toad can you please help me please!!!!!!!!!!!!!

HI,
First create this function to get insert scripts.
/* Formatted on 2012/01/16 10:41 (Formatter Plus v4.8.8) */
CREATE OR REPLACE FUNCTION extractdata (v_table_name VARCHAR2)
   RETURN VARCHAR2
AS
   b_found   BOOLEAN         := FALSE;
   v_tempa   VARCHAR2 (8000);
   v_tempb   VARCHAR2 (8000);
   v_tempc   VARCHAR2 (255);
BEGIN
   FOR tab_rec IN (SELECT table_name
                     FROM user_tables
                    WHERE table_name = UPPER (v_table_name))
   LOOP
      b_found := TRUE;
      v_tempa := 'select ''insert into ' || tab_rec.table_name || ' (';
      FOR col_rec IN (SELECT   *
                          FROM user_tab_columns
                         WHERE table_name = tab_rec.table_name
                      ORDER BY column_id)
      LOOP
         IF col_rec.column_id = 1
         THEN
            v_tempa := v_tempa || '''||chr(10)||''';
         ELSE
            v_tempa := v_tempa || ',''||chr(10)||''';
            v_tempb := v_tempb || ',''||chr(10)||''';
         END IF;
         v_tempa := v_tempa || col_rec.column_name;
         IF INSTR (col_rec.data_type, 'CHAR') > 0
         THEN
            v_tempc := '''''''''||' || col_rec.column_name || '||''''''''';
         ELSIF INSTR (col_rec.data_type, 'DATE') > 0
         THEN
            v_tempc :=
                  '''to_date(''''''||to_char('
               || col_rec.column_name
               || ',''mm/dd/yyyy hh24:mi'')||'''''',''''mm/dd/yyyy hh24:mi'''')''';
         ELSE
            v_tempc := col_rec.column_name;
         END IF;
         v_tempb :=
               v_tempb
            || '''||decode('
            || col_rec.column_name
            || ',Null,''Null'','
            || v_tempc
            || ')||''';
      END LOOP;
      v_tempa :=
            v_tempa
         || ') values ('
         || v_tempb
         || ');'' from '
         || tab_rec.table_name
         || ';';
   END LOOP;
   IF NOT b_found
   THEN
      v_tempa := '-- Table ' || v_table_name || ' not found';
   ELSE
      v_tempa := v_tempa || CHR (10) || 'select ''-- commit;'' from dual;';
   END IF;
   RETURN v_tempa;
END;
SET PAUSE OFF
SET LINESIZE 1200
SET PAGESIZE 100
SET TERMOUT OFF
SET HEAD OFF
SET FEED OFF
SET ECHO OFF
SET VERIFY OFF
SPOOL  GET_INSERTS.SP REP
SELECT EXTRACTDATA('EMP') FROM DUAL;
SPOOL OFF
SET PAUSE  ON
SET LINESIZE 120
SET PAGESIZE 14
SET TERMOUT ON
SET HEAD ON
SET FEED 5
SET ECHO ON
SET VERIFY ON
SELECT    'insert into EMP ('
       || CHR (10)
       || 'EMPNO,'
       || CHR (10)
       || 'ENAME,'
       || CHR (10)
       || 'JOB,'
       || CHR (10)
       || 'MGR,'
       || CHR (10)
       || 'HIREDATE,'
       || CHR (10)
       || 'SAL,'
       || CHR (10)
       || 'COMM,'
       || CHR (10)
       || 'DEPTNO) values ('
       || DECODE (empno, NULL, 'Null', empno)
       || ','
       || CHR (10)
       || ''
       || DECODE (ename, NULL, 'Null', '''' || ename || '''')
       || ','
       || CHR (10)
       || ''
       || DECODE (job, NULL, 'Null', '''' || job || '''')
       || ','
       || CHR (10)
       || ''
       || DECODE (mgr, NULL, 'Null', mgr)
       || ','
       || CHR (10)
       || ''
       || DECODE (hiredate,
                  NULL, 'Null',
                     'to_date('''
                  || TO_CHAR (hiredate, 'mm/dd/yyyy hh24:mi')
                  || ''',''mm/dd/yyyy hh24:mi'')'
       || ','
       || CHR (10)
       || ''
       || DECODE (sal, NULL, 'Null', sal)
       || ','
       || CHR (10)
       || ''
       || DECODE (comm, NULL, 'Null', comm)
       || ','
       || CHR (10)
       || ''
       || DECODE (deptno, NULL, 'Null', deptno)
       || ');'
  FROM emp;
SELECT '-- commit;'
  FROM DUAL;now run the baove select statement you will get the following insert statements
/* Formatted on 2012/01/16 10:57 (Formatter Plus v4.8.8) */
--'INSERT INTO EMP('||CHR(10)||'EMPNO,'||CHR(10)||'ENAME,'||CHR(10)||'JOB,'||CHR(10)||'MGR,'||CHR(10)||'HIREDATE,'||CHR(10)||'SAL,'||CHR(10)||'COMM,'||CHR(10)||'DEPTNO)VALUES('||DECODE(EMPNO,NULL,'NULL',EMPNO)||','||CHR(10)||''||DECODE(ENAME,NULL,'NULL',''''|
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm, deptno
     VALUES (7369, 'SMITH', 'CLERK', 7902,
             TO_DATE ('12/17/1980 00:00', 'mm/dd/yyyy hh24:mi'), 800, NULL, 20
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm, deptno
     VALUES (7499, 'ALLEN', 'SALESMAN', 7698,
             TO_DATE ('02/20/1981 00:00', 'mm/dd/yyyy hh24:mi'), 1600, 300, 30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm, deptno
     VALUES (7521, 'WARD', 'SALESMAN', 7698,
             TO_DATE ('02/22/1981 00:00', 'mm/dd/yyyy hh24:mi'), 1250, 500, 30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7566, 'JONES', 'MANAGER', 7839,
             TO_DATE ('04/02/1981 00:00', 'mm/dd/yyyy hh24:mi'), 2975, NULL,
             20
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7654, 'MARTIN', 'SALESMAN', 7698,
             TO_DATE ('09/28/1981 00:00', 'mm/dd/yyyy hh24:mi'), 1250, 1400,
             30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7698, 'BLAKE', 'MANAGER', 7839,
             TO_DATE ('05/01/1981 00:00', 'mm/dd/yyyy hh24:mi'), 2850, NULL,
             30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7782, 'CLARK', 'MANAGER', 7839,
             TO_DATE ('06/09/1981 00:00', 'mm/dd/yyyy hh24:mi'), 2450, NULL,
             10
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7788, 'SCOTT', 'ANALYST', 7566,
             TO_DATE ('04/19/1987 00:00', 'mm/dd/yyyy hh24:mi'), 3000, NULL,
             20
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7839, 'KING', 'PRESIDENT', NULL,
             TO_DATE ('11/17/1981 00:00', 'mm/dd/yyyy hh24:mi'), 5000, NULL,
             10
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm, deptno
     VALUES (7844, 'TURNER', 'SALESMAN', 7698,
             TO_DATE ('09/08/1981 00:00', 'mm/dd/yyyy hh24:mi'), 1500, 0, 30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7876, 'ADAMS', 'CLERK', 7788,
             TO_DATE ('05/23/1987 00:00', 'mm/dd/yyyy hh24:mi'), 1100, NULL,
             20
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm, deptno
     VALUES (7900, 'JAMES', 'CLERK', 7698,
             TO_DATE ('12/03/1981 00:00', 'mm/dd/yyyy hh24:mi'), 950, NULL, 30
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7902, 'FORD', 'ANALYST', 7566,
             TO_DATE ('12/03/1981 00:00', 'mm/dd/yyyy hh24:mi'), 3000, NULL,
             20
INSERT INTO emp
            (empno, ename, job, mgr,
             hiredate, sal, comm,
             deptno
     VALUES (7934, 'MILLER', 'CLERK', 7782,
             TO_DATE ('01/23/1982 00:00', 'mm/dd/yyyy hh24:mi'), 1300, NULL,
             10
            );i hope this helps .
Thanks,
P Prakash
Edited by: prakash on Jan 15, 2012 9:21 PM
Edited by: prakash on Jan 15, 2012 9:22 PM

Similar Messages

  • RE: How to Export the Table data Into PDF File  in ADF

    Hi Experts,
    I am using Jdeveloper 11.1.2.3.0
    I am created employee VO and Drag and Drop as a Table in a page. So need to Export the Table data into A PDF file.
    So please give me some suggestions regarding this Scnerio.
    With Regards,
    satish

    Hi Guys ,
    Any more answers for this question.
    Please find my jsff below
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core" xmlns:report="http://www.adfwithejb.blogspot.com">
      <af:panelGroupLayout layout="vertical" id="pgl2">
          <af:query id="qryId1" headerText="Service Tariff Mapping Details" disclosed="true"
                    value="#{bindings.findByTarifValidFromQuery.queryDescriptor}"
                    model="#{bindings.findByTarifValidFromQuery.queryModel}"
                    queryListener="#{reportWiseInvoiceBean.genericQueryListener}"
                    queryOperationListener="#{bindings.findByTarifValidFromQuery.processQueryOperation}"
                    resultComponentId="pc1::t2">
         <f:attribute name="queryExpression" value="bindings.findByTarifValidFromQuery.processQuery"/>
                          </af:query>
        <af:panelCollection id="pc1" styleClass="AFStretchWidth">
          <f:facet name="menus"/>
          <f:facet name="toolbar">
              <af:toolbar id="t1">
                 <af:menuBar id="pt_m1">
                <report:reportDeclarative ButtonName="ExportToExcel" ReportName="ServiceTariffMappingDetails"
                                          ReportType="PDF" TableId=":::pc1:t2" id="rd1" Pagination="true"/>
                <af:commandButton text="excel" id="cb1" binding="#{exportToExcelBean.exportID}">
                <af:setActionListener from="pt1:pgl1:pgl2:pc1:t2" to="#{viewScope['exporter.exportedId']}"/>
                <af:setActionListener from="border:1px solid #cccccc" to="#{viewScope['exporter.thStyle']}"/>
                <af:setActionListener from="border:1px solid #cccccc" to="#{viewScope['exporter.tdStyle']}"/>
                <af:fileDownloadActionListener method="#{exportToExcelBean.exportToExcel}" filename="Service TariffMapping.xls"
                                                 contentType="text/excel;chatset=UTF-8;"/>
                </af:commandButton>
                <af:commandMenuItem id="pt_cmi133" icon="/images/common/Excel-icon.png"
                                                shortDesc="ExportToExcel"
                                >
                                <af:exportCollectionActionListener exportedId="t2" type="excelHTML"
                                                                   title="Service Tariff Mapping"
                                                                   filename="Service Tariff Mapping.xls"/>
                            </af:commandMenuItem></af:menuBar>
              </af:toolbar>
          </f:facet>
          <f:facet name="statusbar"/>
          <af:table value="#{bindings.ServiceTariffMappingDtlsRVO1.collectionModel}" var="row"
                    rows="#{bindings.ServiceTariffMappingDtlsRVO1.rangeSize}"
                    emptyText="#{bindings.ServiceTariffMappingDtlsRVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                    fetchSize="#{bindings.ServiceTariffMappingDtlsRVO1.rangeSize}" rowBandingInterval="0"
                    filterModel="#{bindings.findByTarifValidFromQuery.queryDescriptor}"
                    queryListener="#{bindings.findByTarifValidFromQuery.processQuery}" filterVisible="true" varStatus="vs"
                    id="t2" columnStretching="last" binding="#{ServiceTariffMappBean.testTable}">
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.label}"
                       id="c1">
              <af:inputText value="#{row.bindings.NormalTariffCode.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.tooltip}" id="it1">
                <f:validator binding="#{row.bindings.NormalTariffCode.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.label}"
                       id="c2">
              <af:inputText value="#{row.bindings.ServiceCode.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.tooltip}" id="it2">
                <f:validator binding="#{row.bindings.ServiceCode.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.label}" id="c3">
              <f:facet name="filter">
                <af:inputDate value="#{vs.filterCriteria.TrfVldFrm}" id="id1">
                  <af:convertDateTime pattern="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.format}"/>
                </af:inputDate>
              </f:facet>
              <af:inputDate value="#{row.bindings.TrfVldFrm.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.displayWidth}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.tooltip}" id="id2">
                <f:validator binding="#{row.bindings.TrfVldFrm.validator}"/>
                <af:convertDateTime pattern="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.format}"/>
              </af:inputDate>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.label}"
                       id="c4">
              <af:inputText value="#{row.bindings.ServiceDesc.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.tooltip}" id="it3">
                <f:validator binding="#{row.bindings.ServiceDesc.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.label}" id="c5">
              <af:inputText value="#{row.bindings.OtTrfCode.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.tooltip}" id="it4">
                <f:validator binding="#{row.bindings.OtTrfCode.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.label}" id="c6">
              <af:inputText value="#{row.bindings.OtUnitRate.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.tooltip}" id="it5">
                <f:validator binding="#{row.bindings.OtUnitRate.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.label}" id="c7">
              <af:inputText value="#{row.bindings.NtUnitRate.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.tooltip}" id="it6">
                <f:validator binding="#{row.bindings.NtUnitRate.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.label}" id="c8">
              <af:inputText value="#{row.bindings.TrfGrt.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.tooltip}" id="it7">
                <f:validator binding="#{row.bindings.TrfGrt.validator}"/>
              </af:inputText>
            </af:column>
            <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.name}" filterable="true"
                       sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.label}"
                       id="c9">
              <af:inputText value="#{row.bindings.ChargePartyCode.inputValue}"
                            label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.label}"
                            required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.mandatory}"
                            columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.displayWidth}"
                            maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.precision}"
                            shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.tooltip}" id="it8">
                <f:validator binding="#{row.bindings.ChargePartyCode.validator}"/>
              </af:inputText>
            </af:column>
          </af:table>
        </af:panelCollection>
      </af:panelGroupLayout>
    </jsp:root>

  • How to clear the table data at the time of leaving fromt the page

    Hi all,
    I have requirement to clear all the table data on the page. For that i have written code like
    public void clearRunCalcPage(){
    System.out.println("Inside clearRunCalcPage");
    this.getCmProcessView().executeEmptyRowSet();
    this.getCmProcessFiveRecordsView().executeEmptyRowSet();
    But for clearing i don't have any button and i don't have next button also, based on menu navigation i will move from 1 page to another. Here my problem is where can i put this login, i tried with the constructor of the page but that time i am getting errors when i came to the page.
    Can any one suggest me.

    Call a backing bean method on click of the next page and place the below code in the backing bean
              ViewCriteria vc = myView.getViewCriteria("criteriaName");
              vc.setProperty(ViewCriteriaHints.CRITERIA_AUTO_EXECUTE, false);Morgan.

  • How to get the insert scripts from a table data

    hi all,
    i want insert scripts for 100 records from a table.
    suppose i have a table xyz
    xyz:
    id name
    1 abc
    2 def
    i should get insert script for 100 rows like
    insert into xyz(id,name) values (1,'abc');
    insert into xyz(id,name) values (2,'def');
    i want 100 records data from all the tables from my database.
    thanks in advance to all.

    SQL> create table xyz (id number, name varchar2(10));
    Table created.
    SQL> insert into xyz values(1,'abc');
    1 row created.
    SQL> insert into xyz values(2,'def');
    1 row created.
    SQL> select 'insert into xyz values(id,name) values('||id||','''||name||''');' from xyz;
    'INSERTINTOXYZVALUES(ID,NAM
    insert into xyz values(id,name) values(1,'abc');
    insert into xyz values(id,name) values(2,'def');
    SQL>- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to pull the table data into SAP BI

    hi all,
    i have connected to oracle database and i can see the view of the tables in sap BI.can u please help me out how to see the data inside the table and how to load that table data into info cube.

    Hi Vamshi ,
    In R3 there is a t-code RSDBC through that t-code you make your data source .
    I know you already make a connection between r3 and sql2000.
    in RSDBC in logical system name you enter your connection name,and in table /view u should enter sql table name and make sure the table name which u enter in this text box should be store in sql in capital letters and fields should be in capital letters.
    and generate your data source and execute it it show all the record .
    Thanks for material its really gud
    Ankit modi

  • How to copy the table datas into an  open office excel file .

    Hello All ,
    I have a form which contains several pages . Each page contains some tables in it . How can we copy each table datas into an open office execl files ??
    I mean there will be several excel files each file corresponds to a particular table in the form. I am using LiveCycle Designer ES 2 . in Windows XP.
    Thanks
    Bibhu.

    Hi Bibhu,
    Here is a screenshot of exporting the form data to XML:
    I have not imported XML into Excel, but I know that Excel 2007 has tools for this in the Developer tab. I don't have Excel 2007 on this machine, so I can't get screenshots. However using Acrobat you can merge the XML file into a spreadsheet, using the same menu Forms > Manage Form Data > Merge Data Files into Spreadsheet.
    In addition you can set up a data connection to the spreadsheet. However this will only work in a Windows environment and you need to share the OLEDB data connection with all users. In addition if you Reader Enable the form with Acrobat, the data connection will not work.
    So on balance if you want to get data to a spreadsheet I would recommend export XML.
    Hope that helps,
    Niall

  • How to export the table data to the excel?

    Hi,
    I'm new to WebDynpro. im having a table 5rows and 6 columns, i need the data in the table to be exported to excel sheet by clicking on a button.
    As i went through some of the blogs and tutorials i couldn't understand the procedure, so could any one help out with detailed procedure.
    Thanks & Regards,
      Suresh

    HI! Suresh,
      This is a littile bit complicated process.Here i am trying to expalin the procedure,
    if you are having any problem then let me know.
    Following are the steps:--
    1.create two controls one of type linkToAction and other of type FileDownload and a location on your portal server say it's "/server0/temp/webdynpro/web/local/testexcel.xls"
    2.create a method in your view or controller and call this method as downLoadToXls()
    3.create a Value attribute of type binary in your context,say it's dataContent.
    4.Bind your linkToAction Control to the method downLoadToXls() and control   FileDownLoad data property to dataContent.
    5.In the init() Hook methos write the following code:--
    IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("dataContent");
    IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)  attInfo.getModifiableSimpleType();
    // In addition the FileDownload UI element needs for defined resource types
    binaryType.setFileName("testexcel.xls");
    binaryType.setMimeType(WDWebResourceType.XLS);
    6.in DownLoadToXls() method add the following code:--
    try {
            out = new FileOutputStream(path);
           workBook = new HSSFWorkbook();
          hsSheet = workBook.createSheet("UserID");
         cs = workBook.createCellStyle();
         cs1 = workBook.createCellStyle();
         cs2 = workBook.createCellStyle();
         dataFormat = workBook.createDataFormat();
         f = workBook.createFont();
         f1 = workBook.createFont();
         f.setFontHeightInPoints((short) 12);
        //make it blue
         f.setColor( (short)HSSFFont.COLOR_NORMAL );
         //make it bold
        //arial is the default font
        f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        //set font 2 to 10 point type
        f1.setFontHeightInPoints((short) 10);
        //make it red
        f1.setColor( (short)HSSFFont.COLOR_RED);
        //make it bold
        f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        f1.setStrikeout(false);
       cs.setFont(f);
       cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
       //set a thick border
       cs2.setBorderBottom(cs2.BORDER_THICK);
       //fill w fg fill color
       cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
       cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
       //set the cell format to text see HSSFDataFormat for a full list
       cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
       cs2.setFont(f1);
       cs2.setLocked(true);
        cs2.setWrapText(true);
        hsSheet.createFreezePane(0,1,1,1);
        row = hsSheet.createRow(0);
         cell = row.createCell((short)0 ,0);
          cell.setCellValue("User ID");
          cell.setCellStyle(cs2);
          cell = row.createCell((short)1 ,1);
          cell.setCellValue("Last Changed Password Date");
          cell.setCellStyle(cs2);
        int nodeSize = wdContext.nodeUserIDAndPass().size();
        for(int jCount=0; jCount < nodeSize; jCount++) {
         row = hsSheet.createRow(jCount+1);
           for(int count = 0; count < 2; count++) {
          if(count == 0) {
         cell = row.createCell((short)0,count);               
    cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_UserID());
          if(count == 1) {
            cell = row.createCell((short)1,count);
      cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_ChangedPasswd());
          cell.setCellStyle(cs2);                            
                                                               workBook.write(out);
    out.close();
    //Read the file that was created.
            FileInputStream fin = new FileInputStream(path);
            byte b[] = new byte[fin.available()];
           fin.read(b,0,b.length);
           fin.close();
            wdContext.currentContextElement().setDataContent(b);
      }catch(Exception e)     {
      wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true);                   }
    7. Add the follwoing constant at the end:--
    private FileOutputStream out = null;
         private HSSFWorkbook workBook = null;
         private HSSFSheet hsSheet = null;
         private HSSFRow row = null;
         private HSSFCell cell = null;
         private HSSFCellStyle cs = null;
         private HSSFCellStyle cs1 = null;
         private HSSFCellStyle cs2 = null;
         private HSSFDataFormat dataFormat = null;
         private HSSFFont f = null;
         private HSSFFont f1 = null;
         private String path = "/server0/temp/webdynpro/web/local/testexcel.xls";
    8.Add the follwowing jars in your classPath.
    1)poi-3.0.1-FINAL-20070705.jar
    2)jxls.jar
    regards,
    Mithileshwar

  • How to Display the table data ?

    Dear All ,
    Hi,
    i have a requirement that , i develop a one report program that contain one header and item internal table  values . Those header and item table details append to the final internal table(which contain all the header and item) . when i display the values all the the ticket_no will repeated.
    But client wants to display all the ticket_no will not  repeated. He wants output like..
    Please give me steps how to do this issue ?

    Dear Gopi,
    1) In decleration part you decleare like...!
        DATA: LT_SORT TYPE SLIS_T_SORTINFO_ALV,
                   WA_SORT TYPE SLIS_SORTINFO_ALV.
    2) Before  using ' REUSE_ALV_GRID_DISPLAY' Function module
           WA_SORT-FIELDNAME = 'TICK_NO'.
          APPEND WA_SORT TO LT_SORT.
         CLEAR WA_SORT.
    3) use FM : REUSE_ALV_GRID_DISPLAY. Like...!
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = 'X'
          I_CALLBACK_PROGRAM               = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
          I_CALLBACK_TOP_OF_PAGE           = ''
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
          I_STRUCTURE_NAME                 = LT_STRUCT
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
          IT_FIELDCAT                      = LT_FLDCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
        IT_SORT                          = LT_SORT
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
          I_DEFAULT                        = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
           T_OUTTAB                         = LT_FINAL
       EXCEPTIONS
          PROGRAM_ERROR                    = 1
         OTHERS                           = 2 .
        May be it is solve your issue.
    Regards
    K. Chinna..

  • How to generate the deferent pdfs for deferent vendor ?

    Hi,
    i have requirement to generate the each pdf for each vendor and i need to mail those pdfs to respective vendor,
    here i am facing the prob to generate the no of pdfs for deferent vendors...please can any one help me in this how i generate the no of pdfs ?? using wrapeer program ....
    if possible any one can provide some example code..(Exmplae program)
    Thanks,
    PK..

    There are two function use one for convert PDF and second use to email, hope it will give u idea proper.
    Assigning the OTFDATA to OTF Structure table
      CLEAR gt_otf.
      gt_otf[] = gs_otfdata-otfdata[].
    Convert the OTF DATA to SAP Script Text lines
      CLEAR gt_pdf_tab.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = gv_bin_filesize
        TABLES
          otf                   = gt_otf
          lines                 = gt_pdf_tab
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      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 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gs_docdata
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = gt_objpack
            contents_bin               = gt_objbin
            receivers                  = gt_reclist
          contents_txt               = i_objtxt
            object_header              = objhead
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.

  • How to generate the Cobol Source part of the ApplicationViewer

    Hello,
    I'm actually generate the Cobol Source part of the application viewer on a windows environment.
    I'm trying to build it from a Unix environment but I don't know how because I doesn't find the same script in Unix I use in windows.
    Can someone tell me how to generate the Cobol Source part of the application Viewer please ?
    Thank you in advance.

    >
    How can I read the html source code of a webpage
    with a java application?
    Is there a good idea?
    I don't know if this is a good idea, but it works.
    1) Use a URL to obtain the document's location
    2) Use a URLConnection to open a connection between your computer and the
    document server
    3) Connect to the server
    4) Get the InputStream of said connection
    5) Associate the Input Stream with a Buffered Input Stream
    At this point you can use a loop to read lines from the BufferedInput Stream and append them to a TextArea or other suitable text component.

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to generate the BPEL interface from XSD?

    I am new to the BPEL. How to generate the BPEL interface from XSD because I need the inputed payload to have a complex type instead the simple string?
    Thank you

    I made the following change to the xsd file, however when the input type change to emailDataType, it is underline by red color. and the bpm process, activity guide, organization become the unknown project object.
    <?xml version="1.0" encoding="UTF-8"?>
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/SampleBPM/SampleEmailNotification/SendEmail"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="process">
              <complexType>
                   <sequence>
                        <element name="input" type="emailDataType"/>
                   </sequence>
              </complexType>
         </element>
         <element name="processResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    <complexType name="emailDataType" >
    <sequence>
    <element name="toEmailAddress" type="string" />
    <element name="ccEmailAddress" type="string" />
    <element name="emailSubject" type="string" />
    <element name="emailContent" type="string" />
    </sequence>
    </complexType>
    </schema>
    The XSD file is viewed by the design mode is fine on JDeveloper. Please help!

  • How to generate the DNS_VERIFY program

    I�d like to prevent form the spam mails from internet. I edited the mappings table of orig_mail_access segment, but I couldn't find the DNS_verify program in the iPlanet Messaging Server 5.1. Not knowing how to generate the DNS_VERIFY program in the iPlanet Messaging Server 5.1. Could you please kindly check and let me know the way to solve? Thank you very much!
    ps. system info.: solaris8.0,iPlanet Messaging Server 5.1 Patch 1 (built Jun 6 2002)

    look at this link
    http://www.stylusstudio.com/docs/v2006/d_help30.html
    I read sometime back that castor has a tool to do
    conversion. You might have a look into casto as well.

  • Reg :  vo.writeXML() how to filter the data before generating the xml data

    Hi team,
    I have table region with multi selection option.
    My requirement is to fetch the data and generate the xml data for the selected rows.
    By using : writeXML() --> it is fetching all the data.
    What are the methods i need to use,so i can fetch only the selected data ?
    Any pointers ?
    -Sridhar

    Hi Peddi,
    i tried the way u mentioned :
    But the new VO2 (Target) VO is having an extra row, iam not understanding how that is getting stored in VO2.
    Can you please review the below query and let me know if any issue.
    public void copyVO()
    int rowCount=0 ;
    OAFXMLVOImpl vo1 = getOAFXMLVO1(); //source
    OAFXMLVOImpl vo2 = getOAFXMLVO2(); //destination
    OAFXMLVORowImpl row2= null ;
    OAFXMLVORowImpl row1 =null;
    if(vo2!=null && vo2.hasNext())
    { vo2.first();
    do
    vo2.getCurrentRow().remove();
    vo2.next();
    while (vo2.hasNext());
    oracle.jbo.Row[] rows = (oracle.jbo.Row[]) vo1.getFilteredRows("check", "Y");
    rowCount = rows.length;
    if(rowCount>0)
    vo2.setMaxFetchSize(0);
    for(int i=0;i<rowCount;i++)
    row1 = (OAFXMLVORowImpl)rows;
    System.out.println("User ID-->"+ row1.getUserId());
    System.out.println("Checked -->"+ row1.getcheck() );
    row2 = (OAFXMLVORowImpl) vo2.createRow();
    row2.setUserId(row1.getUserId());
    row2.setcheck(row1.getcheck());
    vo2.insertRow(row2);
    row2.setNewRowState(row2.STATUS_INITIALIZED);
    } //end of if
    -Sridhar

Maybe you are looking for

  • How do I configure my Time Capsule to use ethernet?

    Over my Wifi, the estimated backup time is 72 days so guessing an ethernet cable will be substantially faster but don't see a place to configure the Time Machine/Time Capsule interface to default to an ethernet connection.   Anyone know how??? Thanks

  • Adobe Bridge and Nikon D300 files

    Hi to everyone. A simple question, for a simple answer (i hope..). Will Adobe Bridge in the update 2.1.1.9 see my NEF files taken with a Nikon camera? Is that the latest update we have around? Does any of you have experience with NEF files and Bridge

  • Opening a PDF in director

    I want to be able to open a pdf, and I've searched around. It seems like I have the correct scripting, but nothing happens at all when I click my button? on mouseUp me open File(the moviePath & "PDFs\Blood Pathogens.pdf") end Any suggestions? Thanks!

  • Javax.el.ELException: Function 'templates:getFileContents'

    getting following error with "contentpresenter" portal. javax.el.ELException: Function 'templates:getFileContents' specifies 2 params, but 1 were declared weblogic portal starts without any error. here is the start log. FYI, I am using Solaris Operat

  • XML Standard for Comments on Tables, Columns?

    We are creating a new application and plan to store comments inside Oracle using the comment on table / column commands, but would like to store them in a manner that XML tools could understand. Is there some standard naming convention for things lik