How can I insert an aggregated column name as a string in the target table?

I have a large source table, with almost 70 million records.  I need to pull the sum of four of the columns into another target table, but instead of having the same four target columns I just want to have two.
So, let's take SUM(col1), SUM(col2), SUM(col3), and SUM(col4) from the source DB & insert them into the target like this:
SOURCE_COLUMN
| AMOUNT
1 col1
| SUM_AMOUNT
2 col2
| SUM_AMOUNT
3 col3
| SUM_AMOUNT
4 col4
| SUM_AMOUNT
I know how to do this in four separate Data Flows using the source, an Aggregation Transformation, a Derived Column (to hard code the SOURCE_COLUMN label), and destination... but with this many records, it takes over 3 hours to run because it has to loop
through these records four separate times instead of once.  Isn't there a way to do this with one Data Flow?  I'm thinking maybe Conditional Split?
Any help is appreciated, thanks!

Hi ,
  This could be achieved using UNPIVOT transformation. The below sample uses the below source query
SELECT 1 AS COL1,2 AS COL2,3 AS COL3,4 AS COL4
setup the UNPIVOT transformation as below
The output of unpivot transformation will be as below
Hope this helps.
Best Regards Sorna

Similar Messages

  • How can I dynamically specify a Column Name in a Where Clause of a DB

    I have a page that query the Database based on the column Name and values entered by the user. on this page I have a drop down list of all the Column names and a text field. The user can choose from any of the dropdown list option to set the column Name and also enter a value.How can I dynamically pass the option choosed by the user from the drop down list to the dataProvider in seesionBean1 as a column Name???Help

    Hi,
    This is a working example of a search form.
    In the JSP page we have several texts box, a table bound to a DataProvider with the rowSet in the SessionBean and a search button.
    JSP source:
                    <ui:body binding="#{PackageAirtime.body1}" id="body1">
                        <ui:form binding="#{PackageAirtime.form1}" id="form1">
                            <table border="0">
                                <tr>
                                    <td>
                                        <table border="0" width="100%">
                                            <tr>
                                                <td>
                                                    <ui:label binding="#{PackageAirtime.pageTitle}" id="pageTitle" text="Package Airtime"/>
                                                    <br/>
                                                    <br/>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table border="0" cellpadding="2" cellspacing="2">
                                                        <tr>
                                                            <td>Package ID:</td>
                                                            <td>
                                                                <ui:textField binding="#{PackageAirtime.textPackageID}"
                                                                    id="textPackageID"/>
                                                                <ui:button
                                                                    binding="#{PackageAirtime.buttonPackageID}" id="buttonPackageID"
                                                                    onClick="handlePackageIDPopup(); return false;" text="..." toolTip="Open package locator"/>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>Airtime Code:</td>
                                                            <td>
                                                                <ui:textField binding="#{PackageAirtime.textAirtimeCode}"
                                                                    id="textAirtimeCode"/>
                                                                <ui:button
                                                                    action="#{PackageAirtime.buttonAirtimeCode_action}"
                                                                    binding="#{PackageAirtime.buttonAirtimeCode}" id="buttonAirtimeCode"
                                                                    onClick="handleAirtimeCodePopup(); return false;" text="..." toolTip="Open airtime code locator"/>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td></td>
                                                            <td>
                                                                <ui:button action="#{PackageAirtime.searchButton_action}" binding="#{PackageAirtime.searchButton}"
                                                                    id="searchButton" text="Search" toolTip="Search records"/>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <br/>
                                                    <ui:staticText binding="#{PackageAirtime.staticTextSearchResults}" id="staticTextSearchResults"/>
                                                    <br/>
                                                    <ui:table binding="#{PackageAirtime.searchResults}" id="searchResults" paginationControls="true">
                                                        <script>
    /* ----- Functions for Table Preferences Panel ----- */
    * Toggle the table preferences panel open or closed
    function togglePreferencesPanel() {
      var table = document.getElementById("form1:table1");
      table.toggleTblePreferencesPanel();
    /* ----- Functions for Filter Panel ----- */
    * Return true if the filter menu has actually changed,
    * so the corresponding event should be allowed to continue.
    function filterMenuChanged() {
      var table = document.getElementById("form1:table1");
      return table.filterMenuChanged();
    * Toggle the custom filter panel (if any) open or closed.
    function toggleFilterPanel() {
      var table = document.getElementById("form1:table1");
      return table.toggleTableFilterPanel();
    /* ----- Functions for Table Actions ----- */
    * Initialize all rows of the table when the state
    * of selected rows changes.
    function initAllRows() {
      var table = document.getElementById("form1:table1");
      table.initAllRows();
    * Set the selected state for the given row groups
    * displayed in the table.  This functionality requires
    * the 'selectId' of the tableColumn to be set.
    * @param rowGroupId HTML element id of the tableRowGroup component
    * @param selected Flag indicating whether components should be selected
    function selectGroupRows(rowGroupId, selected) {
      var table = document.getElementById("form1:table1");
      table.selectGroupRows(rowGroupId, selected);
    * Disable all table actions if no rows have been selected.
    function disableActions() {
      // Determine whether any rows are currently selected
      var table = document.getElementById("form1:table1");
      var disabled = (table.getAllSelectedRowsCount()>0)?false : true;
      // Set disabled state for top actions
      document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);
      // Set disabled state for bottom actions
      document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);
    }</script>
                                                        <f:facet name="title">
                                                            <ui:staticText binding="#{PackageAirtime.table1Title}" id="table1Title" text="Package Airtime search results"/>
                                                        </f:facet>
                                                        <ui:tableRowGroup binding="#{PackageAirtime.tableRowGroup1}"
                                                            emptyDataMsg="No records matching the search criteria" id="tableRowGroup1"
                                                            sourceData="#{PackageAirtime.s23_package_airtimeDataProvider}" sourceVar="currentRow">
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn1}" headerText="Package ID" id="tableColumn1" sort="S23_PACKAGE">
                                                                <ui:staticText binding="#{PackageAirtime.staticText1}" id="staticText1" text="#{currentRow.value['S23_PACKAGE']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn2}" headerText="Airtime Code" id="tableColumn2" sort="S23_AT_CODE">
                                                                <ui:staticText binding="#{PackageAirtime.staticText2}" id="staticText2" text="#{currentRow.value['S23_AT_CODE']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn7}" headerText="Prepaid Value" id="tableColumn7">
                                                                <ui:staticText binding="#{PackageAirtime.staticText6}" id="staticText6" text="#{currentRow.value['SUBR_AT_PREPAID_PERIOD_VAL']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn8}" headerText="Prepaid Type" id="tableColumn8">
                                                                <ui:staticText binding="#{PackageAirtime.staticText7}" id="staticText7" text="#{currentRow.value['SUBR_AT_PREPAID_TYPE']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn4}" headerText="Start" id="tableColumn4" sort="PRSM_PK_START">
                                                                <ui:staticText binding="#{PackageAirtime.staticText3}" id="staticText3" text="#{currentRow.value['PRSM_PK_START']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn5}" headerText="End" id="tableColumn5">
                                                                <ui:staticText binding="#{PackageAirtime.staticText4}" id="staticText4" text="#{currentRow.value['PRSM_PK_END']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn6}" headerText="Units" id="tableColumn6">
                                                                <ui:staticText binding="#{PackageAirtime.staticText5}" id="staticText5" text="#{currentRow.value['PRSM_PK_UNITS']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn9}" headerText="Carry-over limit" id="tableColumn9" valign="Top">
                                                                <ui:staticText binding="#{PackageAirtime.staticText8}" id="staticText8" text="#{currentRow.value['ROM_PLAN_CARRY_LMT']}"/>
                                                            </ui:tableColumn>
                                                            <ui:tableColumn binding="#{PackageAirtime.tableColumn3}" headerText="Details" id="tableColumn3" width="100">
                                                                <ui:hyperlink action="#{PackageAirtime.viewpackageAT_action}" binding="#{PackageAirtime.hyperlink1}"
                                                                    id="hyperlink1" text="View"/>
                                                            </ui:tableColumn>
                                                        </ui:tableRowGroup>
                                                    </ui:table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ui:form>
                    </ui:body>
    ...JAVA source:
        public void prerender() {
            search_action();
        public String search_action() {
            try {
                String command = "SELECT s23_package, s23_at_code, prsm_pk_start, prsm_pk_end,  prsm_pk_units, subr_at_prepaid_period_val,  subr_at_prepaid_type, subr_disc_type, subr_disc_rate,  subr_disc_value, subr_disc_perm,  subr_at_prepaid_bill_per_val, subr_at_prepaid_recurring,  s23_package_fwd, s23_at_code_fwd, prsm_pk_start_fwd,  subr_ppa_infinite, subr_ppa_carry_over, rom_plan_carry_lmt  FROM s23_package_airtime, ROM_23_PPLAN_COMP  where rom_23_pack_plan = s23_package";
                String where = "";
                String packageID = (String)textPackageID.getText();
                if (packageID == null) {
                    packageID = "";
                packageID = packageID.replace("'", "''");
                if (packageID != "") {
                    if (where != "") {
                        where += " AND ";
                    where += "upper(S23_PACKAGE) LIKE upper('" + packageID + "%')";
                String airtimeCode = (String)textAirtimeCode.getText();
                if (airtimeCode == null) {
                    airtimeCode = "";
                airtimeCode = airtimeCode.replace("'", "''");
                if (airtimeCode != "") {
                    if (where != "") {
                        where += " AND ";
                    where += " upper(S23_AT_CODE) LIKE upper('" + airtimeCode + "%')";
                if (where != "") {
                    command += " AND " + where;
                this.getSessionBean1().getS23_package_airtimeRowSet().setCommand(command);
                this.staticTextSearchResults.setText(tdi.business.Utils.getRowCountMessage(s23_package_airtimeDataProvider.getRowCount()));
            catch (Exception e) {
                log("Error during search for packages airtime", e);
            return null;
        public String searchButton_action() {
            search_action();
            this.tableRowGroup1.setFirst(0);
            return "";
        }I put the search_action() call in the prerender() to have data in my table when the page is open. For a large resultset the best aproach is to let the user select some search criteria and then call the search_action() using a button (searchButton_action() ).
    I've added a hyperlink column to my table, it is used to display the current record details in a new page.
    I have defined in my SessionBean a getRowkey/setRowkey methods.
    When the user click on a "View" hiperlink the following code is executed:
        public String viewpackageAT_action() {
            RowKey row = tableRowGroup1.getRowKey();
            this.getSessionBean1().setPackageAirtimeRowKey(row);
            return "packageairtime_details";
        }I will step over the "Page Navigation".
    In the Detail Page I have the following code:
        public void init() {
           this.s23_package_airtimeDataProvider.setCursorRow(this.getSessionBean1().getPackageAirtimeRowKey());
    }Now I have the detail page opened and also the DataProvider opened at the saved RowKey value.
    Finally, in the SessionBean:
         * Holds value of property packageAirtimeRowKey.
        private RowKey packageAirtimeRowKey;
         * Getter for property packageAirtimeRowKey.
         * @return Value of property packageAirtimeRowKey.
        public RowKey getPackageAirtimeRowKey() {
            return this.packageAirtimeRowKey;
         * Setter for property packageAirtimeRowKey.
         * @param packageAirtimeRowKey New value of property packageAirtimeRowKey.
        public void setPackageAirtimeRowKey(RowKey packageAirtimeRowKey) {
            this.packageAirtimeRowKey = packageAirtimeRowKey;
        }Note: You should enable page navigation in the result(s) table.
    That's about it :)
    Hope this helps,
    Catalin Florean.

  • Issue with INSERT INTO, throws primary key violation error even if the target table is empty

    Hi,
    I am running a simple
    INSERT INTO Table 1 (column 1, column 2, ....., column n)
    SELECT column 1, column 2, ....., column n FROM Table 2
    Table 1 and Table 2 have same definition(schema).
    Table 1 is empty and Table 2 has all the data. Column 1 is primary key and there is NO identity column.
    This statement still throws Primary key violation error. Am clueless about this? 
    How can this happen when the target table is totally empty? 
    Chintu

    Nope thats not true
    Either you're not inserting to the right table or in the background some other trigger code is getting fired which is inserting into some table which causes a PK violation. 
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to use INSERT with no column name specified?

    I want to insert rows into a database table using JDBC's PreparedStatement. I want to specify all values for each row, so that in plain SQL I would not have to specify column names. I wonder if I can do same thing with JDBC in the same manner (it would save a lot of network traffic as far as I can understand)? The problem is:
    I need to know the data types of the columns to use correct setXXX method on my PreparedStatement. For example: ps.setString() for CHAR data and ps.setBytes() for binary data. I can use Connection.getMetadata().getColumns(..,..,tableName,'%') to get column types for all columns in my table as a ResultSet. However but I am not sure if I get them in the right order, i.e. in the order in which the columns have been defined for the table in CREATE TABLE.
    So it seems I have a tough choice: to get type information in order externally or to specify (and probably transfer via network) column names in each INSERT statement. :-(
    Do I have a better choice? Any ideas will be highly appreciated..

    ...if I get them in the right order, ....Only reason for that is if you are using a meta-data type solution. If you are then there is no solution. After all customer name and address are both just text. How could you tell which is first even if you had a way to handle the types?
    But if your inserts are fixed then try using varchars (single ticked entries.) This depends on the database/driver. If is supported then you will have to use SimpleDateFormat to format dates/times in the correct format for the database or use a prepared statement with bind variables.

  • How can I insert multiple page contents in the page layout properly?

    I wanted to create 4 columns on the page layout. These 4 columns are of page contents.
    After creating new web page based on that page layout, I attempted to enter 4 different inputs on all 4 columns.
    Then, the result (from all columns) becomes the same.
    Image - edit the web page based on 4 columns page layout:
    Image - after edit & save:
    How can I insert multiple page contents in the page layout properly?

    First, I copied the HTML snippet for the Page Content on Sharepoint's Design Manger. The code of Page Content HTML snippet is shown below:
    <div data-name="Page Field: Page Content">
    <!--CS: Start Page Field: Page Content Snippet-->
    <!--SPM:<%@Register Tagprefix="PageFieldRichHtmlField"
    Namespace="Microsoft.SharePoint.Publishing.WebControls"
    Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
    <!--MS:<PageFieldRichHtmlField:RichHtmlField
    FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server">-->
    <!--PS: Start of READ-ONLY PREVIEW (do not modify)-->
    <div id="ctl02_label" style="display:none">Page Content</div>
    <div id="ctl02__ControlWrapper_RichHtmlField" class="ms-rtestate-field"
    style="display:inline" aria-labelledby="ctl02_label"><div align="left"
    class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer"
    nowrap="nowrap"><span class="ms-formfieldlabel"
    nowrap="nowrap">Page Content</span></div>
    <div class="ms-formfieldvaluecontainer"><div class="ms-rtestate-field">
    Page Content field value. Lorem ipsum dolor sit incididuntet dolore.</div>
    </div></div></div><!--PE: End of READ-ONLY PREVIEW-->
    <!--ME:</PageFieldRichHtmlField:RichHtmlField>-->
    <!--CE: End Page Field: Page Content Snippet-->
    </div>
    After I published the page layout, I found the code for Page Content from its ASPX page. The code is shown below:
    <div data-name="Page Field: Page Content">
    <PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server"/></div>
    So, I attempted to create 4 columns by using 4 HTML snippets of Page Content on the same page layout. The page layout is generated from HTML file to ASPX file.
    Then I edited some parts in ASPX page layout:
    <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">
    <table>
    <tr>
    <td style="width:70px;">&nbsp;</td>
    <td style="width:250px; text-align:right;">
    <div data-name="Page Field: Page Content">
    <PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server"/>
    </div>
    </td>
    <td style="width:40px;">&nbsp;</td>
    <td style="width:200px;">
    <div data-name="Page Field: Page Content">
    <PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server"/>
    </div>
    </td>
    <td style="width:25px;">&nbsp;</td>
    <td style="width:200px;">
    <div data-name="Page Field: Page Content">
    <PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server"/>
    </div>
    </td>
    <td style="width:25px;">&nbsp;</td>
    <td style="width:200px;">
    <div data-name="Page Field: Page Content">
    <PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server"/>
    </div>
    </td>
    <td style="width:175px;">&nbsp;</td>
    </tr>
    </table>
    </asp:Content>
    The 4 columns for Page Contents appeared on the web page when I created new page using that page layout. But the problem is that all 4 columns displayed the same result from 4th column.

  • How can I Insert data into my msaccess Database table

    Hello all,
    I am new to Java programming and I have problem that how can i insert name into my database table.
    The code which i have written is following:
    String filename = "d:/test.mdb";
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database+= filename.trim() + ";DriverID=22;READONLY=true}";
    Connection con = DriverManager.getConnection(database,"","");
    String s = String.valueOf(text.getText());
    int k =10;
    Statement st = con.createStatement();
    st.execute("create table Test123(name text)");
    st.execute("INSERT INTO Test123 values" +s);
    on the INSERT program throws exception???
    can any one help me how to insert data into tabel.
    Thanks

    he INSERT program throws exception???
    can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.
    Kaj

  • How can I add a new column in compress partition table.

    I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    COMPRESS PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    Note :
    When I create table with this clause it will allow me to add a column.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.

    Hi Fahed,
    I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
    Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
    Topic : When to Use Table Compression
    Bug
    Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
    BUG:<2421054>
    Affects: RDBMS (9-A0)
    NB: FIXED
    Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
    Details:
    This is an enhancement to allow "ALTER TABLE" to ADD/DROP
    columns for tables using the COMPRESS feature.
    In 9i errors are reported for ADD/DROP but the text may
    be misleading:
    eg:
    ADD column fails with "ORA-22856: cannot add columns to object tables"
    DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
    Note that a table which was previously marked as compress which has
    now been altered to NOCOMPRESS also signals such errors as the
    underlying table could still contain COMPRESS format datablocks.
    As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
    Best Regards,
    Muhammad Waseem Haroon
    [email protected]

  • How can i insert the variable value in MS ACCES Query

    i am creating one Query (query1) in MS ACCESS ( like we creaate Tables, Forms and Reports in MS ACCESS ) in this Query i have given 2 constent value in BETWEEN CLAUSE , after that i Created a CROSS QUERY which is based on the privious Query (query1).
    Now i want to insert the variable value using JSP and HTML in to Query(query1).
    Doing this i want to execute the Query (query1) with variable perameters and
    wants to get the risponce form CROSS QUERY.
    In this matter how can i insert the value in Query(query1) using JDBC and JSP.

    The query is
    Select ZMSGMAP.GROUP_CODE as 'group', ZMSDSTATE.STATE_DESC as 'state', ZMSTRN.YRMON, sum(ZMSTRN.CMAQTY) as 'qty' from ZMSDSTATE,ZMSGMAP,ZMSTRN Where ZMSTRN.STATE=ZMSDSTATE.STATE and ZMSTRN.PLANT=ZMSGMAP.PLANT_CODE and ZMSTRN.YRMON between "+p1+" and "+p2+" Group by ZMDGMAP.GROUP_CODE, ZMSDSTATE.STSTE_DESC, ZMSTRN.YRMONUsing this query i m trying to display the risult but the YRMON is displaying in a single column, i want to display it ia seperat columns. here p1 and p2 is YRMON(it is the yer month like 200102), for this solution i have created Cross table Query which is based on uper Query (query1) and design it column wise Display, it is givng the right display, but the problem is this i m not getting the technique throw which i can insert the variable values in to the query1 (which is designed in MS ACCESS).
    u can contact me on [email protected] for more details.

  • How to put the column name and variable value in the alert message.

    Dear,
    how can i put the column name and variable value in the alert message text. i want to display an alert which tell the user about the empty textboxes. that these textboxes must be filled.
    Regards:
    Muhammad Nadeem
    CHIMERA PVT. LTD.
    LAHORE
    [email protected]

    Hello,
    The name of the item that fires the current trigger is stored in the :SYSTEM.TRIGGER_ITEM system variable.
    The value contained in this item can be retrived with the Name_In() built-in
    value := Name_In( 'SYSTEM.TRIGGER_ITEM') ;
    LC$Msg := 'The item ' || :SYSTEM.TRIGGER_ITEM || ' must be entered' ;
    Set_Alert_Property('my_alert_box', ALERT_MESSAGE_TEXT, LC$Msg ) ;
    Ok := Show_Alert( 'my_alert_box' ) ;
    ...Francois

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • How can I inserting file's line into a oracle table in physycal order

    How can I insert the file's line into a oracle table in the same physycal order that they exists in the file ?
    I am using "SQL to FILE" km to performing file load into Oracle table, but the order which the records are insered into the oracle table doesn't match with the order of file's lines
    How can I guarantee the same file's physycal order in the oracle table( target ) and file( source ) ?
    Is it possible throught ODI ?
    Thanks,
    Luciana

    Hi,
    although I understand why use "File to Oracle( SQLLDR )" KM, I haven't the guarantee that in the agent's machine the Oracle Client installed and because when I openned the others projects I saw that anyone in my company use this KM( "File to Oracle( SQLLDR )" )
    Tha's why I ask for anyone lead me whith the modification of the previous post in the "uLKM File to SQL", specifing the km step e where put the RECNUM pseudo column
    This is fundamental for my ODI project
    When I try to alter the "Create Work Table" and "Load Data" step of my "uLKM File to SQL" km, the execution returned me the error below:
    =====================> Create Work Table Step
    create table <@= vWorkTable @>
         C1_LINHA_ARQ     VARCHAR2(500) NULL, RECNUM NUMBER(10)
    =====================> Load Data Step
    select     LINHA_ARQ     C1_LINHA_ARQ
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=ARQ_INSS2SNP$CRLOAD_FILE=/arquivos_odi/ccrs/in/#CCRS_CAD_INSS.vpNOME_ARQUIVOSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LINHA_ARQSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=500SNP$CRPRECISION=500SNP$CR$$SNPS_END_KEY*/
    insert into ODI_RUN_CONV.C$_0TMP_ODI_INSS_DADOS_ARQ
         C1_LINHA_ARQ, RECNUM
    values
         :C1_LINHA_ARQ, RECNUM
    =====================
    984 : 42000 : java.sql.BatchUpdateException: ORA-00984: column not allowed here
    984 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here
    java.sql.BatchUpdateException: ORA-00984: column not allowed here
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)
         at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
         at com.sunopsis.sql.SnpsQuery.executeBatch(Unknown Source)
    ...Thanks again gyus,
    Luciana
    Edited by: 933810 on 31/05/2012 06:04
    Edited by: 933810 on 31/05/2012 06:07
    Edited by: 933810 on 31/05/2012 06:14

  • Urgent -please- how can I insert my context into proxy request ?

    here is par of my request after I have transformed it, to the bs request.
    Routed Service
              Route to: "SkatEtilAndelsbogAnmeldelseSvarService"
         $outbound:
         <con:endpoint      name="BusinessService$dk.skat.etil$bz$SkatEtilAndelsbogAnmeldelseSvarService" xmlns:con="http://www.bea.com/wli/sb/context">
         <con:service>
         <con:operation>getAnmeldelseKvitteringModtag</con:operation>
         </con:service>
         <con:transport>
         <con:mode>request-response</con:mode>
         <con:qualityOfService>best-effort</con:qualityOfService>
         <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
         <http:Content-Type>text/xml</http:Content-Type>
         <http:SOAPAction>
         "http://skat.dk/etil/2011/02/11/getAnmeldelseKvitteringModtag"
         </http:SOAPAction>
         </tran:headers>
         </con:request>
         </con:transport>
         <con:security>
         <con:doOutboundWss>true</con:doOutboundWss>
         </con:security>
         </con:endpoint>
         $body (request):
         <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <ns:Kontekst      xmlns:ns20="http://skat.dk/etil/2011/02/11/" xmlns:ns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/">
         <TransaktionsID>34c768d8-4f6d-4194-93b7-e77ffa8c76e6</TransaktionsID>
         <TransaktionsTid>2011-06-30T14:40:15.105+02:00</TransaktionsTid>
         </ns:Kontekst>
         <ns:AnmeldelseKvitteringModtag_I      xmlns:ns="http://skat.dk/etil/2011/02/11/">
         <ns1:AnmeldelseKvitteringModtag      xmlns:ns1="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
    my problem is how can I insert the
    <ns:Kontekst      xmlns:ns20="http://skat.dk/etil/2011/02/11/" xmlns:ns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/">
         <TransaktionsID>34c768d8-4f6d-4194-93b7-e77ffa8c76e6</TransaktionsID>
         <TransaktionsTid>2011-06-30T14:40:15.105+02:00</TransaktionsTid>
         </ns:Kontekst>
    inside
    <ns:AnmeldelseKvitteringModtag_I      xmlns:ns="http://skat.dk/etil/2011/02/11/">
    The context is generated using this:
    <ns:Kontekst xmlns:ns20="http://skat.dk/etil/2011/02/11/">
    <TransaktionsID>{fn-bea:uuid()}</TransaktionsID>
    <TransaktionsTid>{fn:current-dateTime()}</TransaktionsTid>
    </ns:Kontekst>

    request before context:
    <ns2:AnmeldelseKvitteringModtag xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:xd="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
    <ns:AnmeldelseIdentifikator>string</ns:AnmeldelseIdentifikator>
    <ns:AktoerReference>
    <ns:AktoerID>string</ns:AktoerID>
    <ns:KorrelationID>string</ns:KorrelationID>
    </ns:AktoerReference>
    <!--Optional:-->
    <ns:SagsReference>string</ns:SagsReference>
    <ns1:KoeIndikator>false</ns1:KoeIndikator>
    <ns1:ProeveTinglysningIndikator>true</ns1:ProeveTinglysningIndikator>
    <xd:Signature Id="string">
    <xd:SignedInfo Id="string">
    <xd:CanonicalizationMethod Algorithm="http://www.your.org/aeoliam/quae">
    ventos
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    verrantque
    </xd:CanonicalizationMethod>
    <xd:SignatureMethod Algorithm="http://www.sample.org/turbine/circum">
    regemque
    <!--Optional:-->
    <xd:HMACOutputLength>100</xd:HMACOutputLength>
    nimborum
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    fremunt
    </xd:SignatureMethod>
    <!--1 or more repetitions:-->
    <xd:Reference Id="string" URI="http://www.my.com/profundum/sceptra" Type="http://www.test.com/iovis/flammato">
    <!--Optional:-->
    <xd:Transforms>
    <!--1 or more repetitions:-->
    <xd:Transform Algorithm="http://www.sample.com/bella/nubibus">
    flammas
    <!--You have a CHOICE of the next 2 items at this level-->
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    <xd:XPath>string</xd:XPath>
    ac
    </xd:Transform>
    </xd:Transforms>
    <xd:DigestMethod Algorithm="http://www.my.com/ac/caelumque">
    speluncis
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    circum
    </xd:DigestMethod>
    <xd:DigestValue>YXJpcw==</xd:DigestValue>
    </xd:Reference>
    </xd:SignedInfo>
    <xd:SignatureValue Id="string">Y29uaXVueA==</xd:SignatureValue>
    <!--Optional:-->
    <xd:KeyInfo Id="string">
    praeterea
    <!--You have a CHOICE of the next 8 items at this level-->
    <xd:KeyName>string</xd:KeyName>
    <xd:KeyValue>
    arce
    <!--You have a CHOICE of the next 3 items at this level-->
    <xd:DSAKeyValue>
    <xd:P>Y2xhdXN0cmE=</xd:P>
    <xd:Q>Y2lyY3Vt</xd:Q>
    <!--Optional:-->
    <xd:G>aW1wZXJpbw==</xd:G>
    <xd:Y>Y2VydG8=</xd:Y>
    <!--Optional:-->
    <xd:J>cXVpc3F1YW0=</xd:J>
    <xd:Seed>ZXQ=</xd:Seed>
    <xd:PgenCounter>YWM=</xd:PgenCounter>
    </xd:DSAKeyValue>
    <xd:RSAKeyValue>
    <xd:Modulus>ZmV0YQ==</xd:Modulus>
    <xd:Exponent>YWM=</xd:Exponent>
    </xd:RSAKeyValue>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    sed
    </xd:KeyValue>
    <xd:RetrievalMethod URI="http://www.test.org/pectore/austris" Type="http://www.your.gov/certo/dare">
    <!--Optional:-->
    <xd:Transforms>
    <!--1 or more repetitions:-->
    <xd:Transform Algorithm="http://www.any.com/volutans/dedit">
    faciat
    <!--You have a CHOICE of the next 2 items at this level-->
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    <xd:XPath>string</xd:XPath>
    magno
    </xd:Transform>
    </xd:Transforms>
    </xd:RetrievalMethod>
    <xd:X509Data>
    <!--You have a CHOICE of the next 6 items at this level-->
    <xd:X509IssuerSerial>
    <xd:X509IssuerName>string</xd:X509IssuerName>
    <xd:X509SerialNumber>100</xd:X509SerialNumber>
    </xd:X509IssuerSerial>
    <xd:X509SKI>ZXQ=</xd:X509SKI>
    <xd:X509SubjectName>string</xd:X509SubjectName>
    <xd:X509Certificate>YWM=</xd:X509Certificate>
    <xd:X509CRL>ZXQ=</xd:X509CRL>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    </xd:X509Data>
    <xd:PGPData>
    <!--You have a CHOICE of the next 2 items at this level-->
    <xd:PGPKeyID>cmVnZW1xdWU=</xd:PGPKeyID>
    <!--Optional:-->
    <xd:PGPKeyPacket>YW5ub3M=</xd:PGPKeyPacket>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    <xd:PGPKeyPacket>aW5maXhpdA==</xd:PGPKeyPacket>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    </xd:PGPData>
    <xd:SPKIData>
    <xd:SPKISexp>dmVudG9z</xd:SPKISexp>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    </xd:SPKIData>
    <xd:MgmtData>string</xd:MgmtData>
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    tenens
    </xd:KeyInfo>
    <!--Zero or more repetitions:-->
    <xd:Object Id="string" MimeType="string" Encoding="http://www.my.org/rapidum/habenas">
    insuper
    <!--You may enter ANY elements at this point-->
    <AnyElement/>
    mollitque
    </xd:Object>
    </xd:Signature>
    </ns2:AnmeldelseKvitteringModtag>
    This is after the transformation.
    Routed Service
              Route to: "SkatEtilAndelsbogAnmeldelseSvarService"
         $outbound:
         <con:endpoint      name="BusinessService$dk.skat.etil$bz$SkatEtilAndelsbogAnmeldelseSvarService" xmlns:con="http://www.bea.com/wli/sb/context">
         <con:service>
         <con:operation>getAnmeldelseKvitteringModtag</con:operation>
         </con:service>
         <con:transport>
         <con:mode>request-response</con:mode>
         <con:qualityOfService>best-effort</con:qualityOfService>
         <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
         <http:Content-Type>text/xml</http:Content-Type>
         <http:SOAPAction>
         "http://skat.dk/etil/2011/02/11/getAnmeldelseKvitteringModtag"
         </http:SOAPAction>
         </tran:headers>
         </con:request>
         </con:transport>
         <con:security>
         <con:doOutboundWss>true</con:doOutboundWss>
         </con:security>
         </con:endpoint>
         $body (request):
         <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <ns:Kontekst      xmlns:ns20="http://skat.dk/etil/2011/02/11/" xmlns:ns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/">
         <TransaktionsID>93235d7a-131d-45a7-a36b-34fd9c83343f</TransaktionsID>
         <TransaktionsTid>2011-06-30T15:35:55.567+02:00</TransaktionsTid>
         </ns:Kontekst>
         <ns:AnmeldelseKvitteringModtag_I      xmlns:ns="http://skat.dk/etil/2011/02/11/">
         <ns1:AnmeldelseKvitteringModtag      xmlns:ns1="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
         <ns2:AnmeldelseIdentifikator      xmlns:ns2="http://rep.oio.dk/tinglysning.dk/schema/model/1/">string</ns2:AnmeldelseIdentifikator>
         <ns2:AktoerReference      xmlns:ns2="http://rep.oio.dk/tinglysning.dk/schema/model/1/">
         <ns3:AktoerID      xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/" xmlns:xd="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://rep.oio.dk/tinglysning.dk/schema/model/1/">string</ns3:AktoerID>
         <ns3:KorrelationID      xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/" xmlns:xd="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://rep.oio.dk/tinglysning.dk/schema/model/1/">string</ns3:KorrelationID>
         </ns2:AktoerReference>
         <ns2:SagsReference      xmlns:ns2="http://rep.oio.dk/tinglysning.dk/schema/model/1/">string</ns2:SagsReference>
         <ns2:KoeIndikator      xmlns:ns2="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/">false</ns2:KoeIndikator>
         <ns2:ProeveTinglysningIndikator      xmlns:ns2="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/">true</ns2:ProeveTinglysningIndikator>
         <xd:Signature      Id="string" xmlns:xd="http://www.w3.org/2000/09/xmldsig#">
         <xd:SignedInfo      Id="string" xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
         <xd:CanonicalizationMethod      Algorithm="http://www.your.org/aeoliam/quae">
         ventos
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         verrantque
         </xd:CanonicalizationMethod>
         <xd:SignatureMethod      Algorithm="http://www.sample.org/turbine/circum">
         regemque
         <!--Optional:-->
         <xd:HMACOutputLength>100</xd:HMACOutputLength>
         nimborum
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         fremunt
         </xd:SignatureMethod>
         <!--1 or more repetitions:-->
         <xd:Reference      Id="string" URI="http://www.my.com/profundum/sceptra" Type="http://www.test.com/iovis/flammato">
         <!--Optional:-->
         <xd:Transforms>
         <!--1 or more repetitions:-->
         <xd:Transform      Algorithm="http://www.sample.com/bella/nubibus">
         flammas
         <!--You have a CHOICE of the next 2 items at this level-->
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         <xd:XPath>string</xd:XPath>
         ac
         </xd:Transform>
         </xd:Transforms>
         <xd:DigestMethod      Algorithm="http://www.my.com/ac/caelumque">
         speluncis
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         circum
         </xd:DigestMethod>
         <xd:DigestValue>YXJpcw==</xd:DigestValue>
         </xd:Reference>
         </xd:SignedInfo>
         <xd:SignatureValue      Id="string" xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">Y29uaXVueA==</xd:SignatureValue>
         <!--Optional:-->
         <xd:KeyInfo      Id="string" xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
         praeterea
         <!--You have a CHOICE of the next 8 items at this level-->
         <xd:KeyName>string</xd:KeyName>
         <xd:KeyValue>
         arce
         <!--You have a CHOICE of the next 3 items at this level-->
         <xd:DSAKeyValue>
         <xd:P>Y2xhdXN0cmE=</xd:P>
         <xd:Q>Y2lyY3Vt</xd:Q>
         <!--Optional:-->
         <xd:G>aW1wZXJpbw==</xd:G>
         <xd:Y>Y2VydG8=</xd:Y>
         <!--Optional:-->
         <xd:J>cXVpc3F1YW0=</xd:J>
         <xd:Seed>ZXQ=</xd:Seed>
         <xd:PgenCounter>YWM=</xd:PgenCounter>
         </xd:DSAKeyValue>
         <xd:RSAKeyValue>
         <xd:Modulus>ZmV0YQ==</xd:Modulus>
         <xd:Exponent>YWM=</xd:Exponent>
         </xd:RSAKeyValue>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         sed
         </xd:KeyValue>
         <xd:RetrievalMethod      URI="http://www.test.org/pectore/austris" Type="http://www.your.gov/certo/dare">
         <!--Optional:-->
         <xd:Transforms>
         <!--1 or more repetitions:-->
         <xd:Transform      Algorithm="http://www.any.com/volutans/dedit">
         faciat
         <!--You have a CHOICE of the next 2 items at this level-->
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         <xd:XPath>string</xd:XPath>
         magno
         </xd:Transform>
         </xd:Transforms>
         </xd:RetrievalMethod>
         <xd:X509Data>
         <!--You have a CHOICE of the next 6 items at this level-->
         <xd:X509IssuerSerial>
         <xd:X509IssuerName>string</xd:X509IssuerName>
         <xd:X509SerialNumber>100</xd:X509SerialNumber>
         </xd:X509IssuerSerial>
         <xd:X509SKI>ZXQ=</xd:X509SKI>
         <xd:X509SubjectName>string</xd:X509SubjectName>
         <xd:X509Certificate>YWM=</xd:X509Certificate>
         <xd:X509CRL>ZXQ=</xd:X509CRL>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         </xd:X509Data>
         <xd:PGPData>
         <!--You have a CHOICE of the next 2 items at this level-->
         <xd:PGPKeyID>cmVnZW1xdWU=</xd:PGPKeyID>
         <!--Optional:-->
         <xd:PGPKeyPacket>YW5ub3M=</xd:PGPKeyPacket>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         <xd:PGPKeyPacket>aW5maXhpdA==</xd:PGPKeyPacket>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         </xd:PGPData>
         <xd:SPKIData>
         <xd:SPKISexp>dmVudG9z</xd:SPKISexp>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         </xd:SPKIData>
         <xd:MgmtData>string</xd:MgmtData>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         tenens
         </xd:KeyInfo>
         <!--Zero or more repetitions:-->
         <xd:Object      Id="string" MimeType="string" Encoding="http://www.my.org/rapidum/habenas" xmlns:ns1="http://rep.oio.dk/tinglysning.dk/schema/anmeldelse/1/" xmlns:ns="http://rep.oio.dk/tinglysning.dk/schema/model/1/" xmlns:ns2="http://rep.oio.dk/tinglysning.dk/svarservice/message/anmeldelse/1/">
         insuper
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         mollitque
         </xd:Object>
         </xd:Signature>
         </ns1:AnmeldelseKvitteringModtag>
         </ns:AnmeldelseKvitteringModtag_I>
         </soapenv:Body>

  • How can i insert pseudocolumn (sequencename.nextval) with oracleXmlSave?

    how can i insert pseudocolumn value (sequencename.nextval) with oracleXmlSave.insertXml(xmlfile)?
    if anyone know it, pls post the answer to the bbs or reply me: [email protected]
    thank u so much.

    You can create a trigger on the table and insert your sequence no from there or create a updateable view and create insted off trigger to populate your columns. I am new to XML, but I think this the way you can do it esealy. Or may be this the only way.

  • How can I add new row/column into existing jTable?

    Hi add!
    Can you help me how can I add new row/column into existing jTable?
    Tnx in adv!

    e.g
    Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
    their handlers are:
    add new row:
    //i supose u already have
    DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
    //and   
       JTabel jtable = new JTable(tablemodel);
    // Handler (row)
    jbtAddRow.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e) {
          if(jtable.getSelectedRow() >= 0 )
              tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());  
           else  
                tablemodel.addRow(new java.util.Vector());
        });to add new columns its the same but inside actionPerformed method:
    ask for e.g "Whats the name for the new column"
    then,
       tablemodel.addColumn(nameOfColumn, new java.util.Vector());   Joao
    Message was edited by:
    Java__Estudante

  • How can i inserts record using procedure in adf

    how can i insert record using procedure
    hi i have the following i what to insert record using store procedure, i try this
    am in JDeveloper Studio 11.1.2.1.0
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="SmsPartyAddressView"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.SmsPartyAddressViewRowImpl"
      ComponentClass="sms1100.SmsPartyAddressViewImpl"
      DefClass="sms1100.SmsPartyAddressViewDefImpl"
      RowInterface="sms1100.common.SmsPartyAddressViewRow"
      ClientRowProxyName="sms1100.client.SmsPartyAddressViewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Def|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.SmsPartyAddressView_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
             SmsProperties.ERF_NO,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ZONE,
           SmsProperties.GPS_LONGITUDE,
           SmsProperties.GPS_LATITUDE,
           SmsProperties.TOW_ID,
           SmsProperties.WAR_ID,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress,
         SMS_PROPERTIES SmsProperties,
          SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
          WHERE TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SMSPARTYADDRESS.PROP_ID = SMSPROPERTIES.ID
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ID"
        Expression="ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        Expression="START_DT"
        SQLType="DATE"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLongitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LONGITUDE"
        Expression="GPS_LONGITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLatitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LATITUDE"
        Expression="GPS_LATITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="WarId"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.Integer"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>my calling method is
    public class SmsPartyAddressViewRowImpl extends ViewRowImpl implements SmsPartyAddressViewRow {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
           // String Addressline = null;
            String Zone = "UNDERF";
            Date StartDt = null;
           // EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
           // SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { getParId(), getAddressTypeInd(), getAddressLine1(),
        getAddressLine2(), getAddressLine3(), getAddressLine4(),getAddressLine(),getSuburb(),getTown(),getPostalCode(),getTowId(),Zone,StartDt });
    Edited by: ADF007 on 2012/08/13 6:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    that solution was based on the hr schema now am inserting using my schema
    inserting record in a view using procedure
    hi i have the folowing view, i what to insert record using procedure,this is what i what ,i what to insert record using the view but pass those view variable to procedure. my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsproppartyview"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.smsproppartyviewRowImpl"
      ComponentClass="sms1100.smsproppartyviewImpl"
      RowInterface="sms1100.common.smsproppartyviewRow"
      ClientRowProxyName="sms1100.client.smsproppartyviewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsproppartyview_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_LINE1,
            SmsProperties.ADDRESS_LINE,     
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE,
            SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
            SmsProperties.ID AS ID1,
           SmsPartyAddress.ADDRESS_TYPE_IND,      
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID1"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        SQLType="DATE">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="WarId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>this is what i have try
    public class smsproppartyviewImpl extends ViewObjectImpl {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
            String Addressline = null;
            String Zone = "UNDERF";
            String Town = null;
            String Suburb = null;
            String PostalCode = null;
            String Addressline1 = null;
            String Addressline2 = null;
            String Addressline3 = null;
            String Addressline4 = null;
            Integer AddressTypeInd = null;
            Integer parid = null;
            //Date StartDt = null;
            Integer towid = null;
            ApplicationModuleHandle handle = null;
                               handle = Configuration.createRootApplicationModuleHandle
                               ("sms1100.sms1100Moduleold", "sms1100ModuleShared");
                               ApplicationModule sam = handle.useApplicationModule();
                               sam.processChangeNotifications();
            ViewObject svo = sam.findViewObject("smsproppartyview1");
            svo.executeQuery();
            Row row = svo.first();
            if (svo != null){
                Addressline = (String)row.getAttribute("AddressLine");
                Zone = (String)row.getAttribute("Zone");
                Town = (String)row.getAttribute("Town");
                Suburb = (String)row.getAttribute("Suburb");
                PostalCode = (String)row.getAttribute("PostalCode");
                towid = (Integer)row.getAttribute("TowId");
                Addressline1 = (String)row.getAttribute("Addressline1");
                Addressline2 = (String)row.getAttribute("Addressline2");
                Addressline3 = (String)row.getAttribute("Addressline3");
                Addressline4 = (String)row.getAttribute("Addressline4");
                AddressTypeInd = (Integer)row.getAttribute("AddressTypeInd");
                parid = (Integer)row.getAttribute("ParId");
            //EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
            //SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
            //newSmsProperties.setAddressLine(Addressline);
            //newSmsProperties.setTowId(towid);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { parid, AddressTypeInd, Addressline1,
        Addressline2, Addressline3, Addressline4,Addressline,Town,Suburb,PostalCode,towid,Town,Suburb,PostalCode,towid,Zone });
    }am in Jdeveloper 11.1.2.1.0

Maybe you are looking for

  • Hard drive upgrade to my Macbook Pro - early 2008

    I want to upgrade my hard drive and saw this one on Amazon.  Western Digital WD Scorpio Black 750 GB SATA 3 GB/s 7200 RPM 16 MB Cache Internal Bulk/OEM 2.5-Inch Mobile Hard Drive.  Can anyone tell me if this will work ok with my setup. thanks DJH

  • BUG: Adding a new parent with multiple children in one transaction

    Technology scope: JDeveloper Studio Edition Version 11.1.1.0.2, ADF Business Components. If you have a master-detail page (where master and detail views are both updateable tables) and you insert a new master record (without committing it) and you co

  • Mobile application of Creative Cloud.

    More than slightly irritated that Apple is exclusive to the mobile application of the adobe creative cloud programs.  I signed up a few months ago when I purchased a desktop fast enough to run everything sufficiently and have just recently discovered

  • Copy paste from Fireworks/Photoshop to Illustrator. not scaled correctly.

    Hi, I have an image thats originally about 800 x 1000 pixels. When I copy (ctrl + C) it from photoshop or fireworks in to illustrator. Its scaled very small, and stretching it becomes pixelated. shrinking it makes it have jagged edges, and I cannot f

  • Connecting Oracle 7.0...

    Hi, I would like to connect to Oracle 7.0 via windows platform. I use Jdbc-Odbc drivers but it is not as fast as Odbc. Is native drivers exist to connect Oracle 7.0 or specific settings for my current drivers ? Thx.