How to use DB queries inside a schedule task - OIM

Hello Experts,
I am trying to create an UDF from a schedule task by directly inserting into table.
1. Insert a record into Table SDC for the new UDF
2. Alter table USR for the new UDF (After inserting into SDC)
When I run the task it inserts a record into SDC table and throws below error when it tries to alter the USR table but same query works in SQL Plus.
Alter Query -- ALTER TABLE USR ADD (USR_UDF_UID  varchar2(50))
ERROR,12 Sep 2011 14:04:29,509,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: Invalid column index
java.sql.SQLException: Invalid column index
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5007)
at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4997)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:277)
at weblogic.jdbc.wrapper.PreparedStatement.setString(PreparedStatement.java:745)
at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
at com.thortech.xl.ejb.databeansimpl.tcDataBaseBean.writePreparedStatement(Unknown Source)
at com.thortech.xl.ejb.beans.tcDataBase_vhi04i_EOImpl.writePreparedStatement(tcDataBase_vhi04i_EOImpl.java:4280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
at $Proxy59.writePreparedStatement(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBaseClient.writePreparedStatement(Unknown Source)
at com.thortech.xl.dataobj.PreparedStatementUtil.executeUpdate(Unknown Source)
at com.test.TestUtility.createUDF(TestUtility)
at com.test.TestUtility.execute(TestUtility)
at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
ERROR,12 Sep 2011 14:04:29,569,[XELLERATE.DATABASE],Class/Method: tcDataBaseClient/writePreparedStatement encounter some pr
com.thortech.xl.orb.dataaccess.tcDataAccessException
at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
at com.thortech.xl.ejb.databeansimpl.tcDataBaseBean.writePreparedStatement(Unknown Source)
at com.thortech.xl.ejb.beans.tcDataBase_vhi04i_EOImpl.writePreparedStatement(tcDataBase_vhi04i_EOImpl.java:4280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
at $Proxy59.writePreparedStatement(Unknown Source)
at com.thortech.xl.dataaccess.tcDataBaseClient.writePreparedStatement(Unknown Source)
Code:
String insertQry = "INSERT INTO SDC () VALUES (?,?.,,,,)"
          prepareStmtUtil = new PreparedStatementUtil();
          prepareStmtUtil.setStatement( getDataBase() , insertQry );
          prepareStmtUtil.setString(1, SDC_NAME);
prepareStmtUtil.executeUpdate();
          int rc = prepareStmtUtil.getRowsUpdated();
          if (rc == 1)
String alterQry = "ALTER TABLE USR ADD ("+SDC_NAME+" varchar2("+SDC_SQL_LENGTH+"))";
               prepareStmtUtil.setStatement( getDataBase() , alterQry );
               prepareStmtUtil.executeUpdate(); --> throws exception here
Kindly assist me.
Thanks and Regards
INIYA

I am trying to create an UDF from a schedule task by directly inserting into table.This is altering DB schema, not inserting into a table, that are you trying to do. DDL operations are not supported in PrepareStatementUtil. Moreover, I'm almost sure the DDL operations are not allowed for operational db connection.
Use OIM API (ConfigManager) if you want to manipulate UDF.
Regards,
Vladimir

Similar Messages

  • How to use multi queries inside the RTF file

    Hi all,
    I develope a data source in report developer 10g, and use it to create the RTF files... I have some files wich contains more than 1 query. how can I refer to the fileds in the other queries in side the RTF file, because it's bring the filed from the first query by default??
    ThanX in advance

    ThankX DD
    But that wont work for my case. the problem that I have actually is in RTF.
    for example:
    I have 3 qeuries. A,B & C. A: contains the employee data. B: his Earnings and C: his Deductions.
    in the RTF file it shows me only A contents. wich means it's not entring B & C loops, notice I add <?for-each:B_GROUP_NAME?> and same for C also.
    all my other reports wich have single qeury worked fine.
    Regards to all,
    Message was edited by:
    Adam Ali

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • How to use CELLWRAPPER in 10g for scheduling the job in print server?

    Hi Gurus,
    I need to add CELLWRAPPER while printing a report to a delimited file from
    10G report server using 10G print server job scheduler. In 6i Its working fine.
    Below code I used in 10G.
    V_Cellwrapper := '''"''';
    Srw.Add_Parameter(v_Param_List, 'CELLWRAPPER' , V_Cellwrapper);
    v_Job := Srw.Run_Report (v_Param_List);
    But It is throwing error (ORA-20999). Please help.

    Hi,
    when I remember right, 20999 is in the range of user defined exceptions. So it's not an error message created by Oracle internally, it's created by a developer (might be in your case inside a trigger). So I would look in the database, when this exception is created. Is there no text with the error-message?
    Regards
    Rainer

  • How is the db connection used... and how to use the queries

    dear sir,
    i have to important question.
    i am pasting the code of a jsp file below.... please look in to this...
    in this page.. how is he making a database connection... and in this page
    where are the select statements and queries.... i have tried many times reading
    this ..but i could not find the queries ..not even any one.
    if anyone sees this jsp file also ... he will not be able to see the queries.
    can u please help me .. how to do this type of connection and also how to use queries
    like select insert and delete and update .
    an example will help me out...please help me...
    Ramesh
    the file is below....
    <%@ include file="jtfincl.jsp" %>
    <%@ page language="java" %>
    <%@ page import="oracle.apps.ibu.common.IBUContext" %>
    <%@ page import="oracle.apps.ibu.common.IbuException" %>
    <%@ page import="oracle.apps.ibu.common.Employee" %>
    <%@ page import="oracle.apps.ibu.common.EmployeeInfo" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="oracle.apps.jtf.aom.transaction.*" %>
    <%@ page import="oracle.apps.jtf.base.resources.*" %>
    <%@ page import="oracle.apps.jtf.base.interfaces.MessageManagerInter"%>
    <%@ page import="oracle.apps.ibu.registration.IbuRegistration" %>
    <%@ page import="oracle.apps.ibu.registration.CustomerVO" %>
    <%@ page import="oracle.apps.ibu.common.IDNamePair" %>
    <%@ page import="oracle.apps.ibu.common.*" %>
    <%@ page import="oracle.apps.ibu.registration.*" %>
    <%@ page import="java.math.BigDecimal" %>
    <jsp:useBean id = "_displayManager"
    class = "oracle.apps.ibu.common.DisplayManager"
    scope = "application" />
    <jsp:useBean id = "ibuPromptManager"
    class = "oracle.apps.ibu.common.PromptManager"
    scope = "application" />
    <%
    String appName= "IBU";
    boolean stateless=true;      // used for jtfsrfp.jsp
    SiteProperty.load();
    String username = SiteProperty.getGuestUsername();
    String password = SiteProperty.getGuestPassword();
    %>
    <%@ include file="jtfsrfp.jsp" %>
    <%
         String forwardURL = null;
         String backURL = null;
    String emailAddress = null;     
         long employeeID = -1;
         String submitType = (String) request.getParameter("submitType");
         IBUContext context = new IBUContext(fwSession);
         String errorKey = "";
         String errorMessage = "";
         String errorStack = "";
         boolean currentStatus = true;
    Object lockx = new Object ();
         OracleConnection conn = null;
    try
         TransactionScope.begin(lockx);
    try
    conn = (OracleConnection)
    TransactionScope.getConnection();
         catch ( Exception e )
    throw new FrameworkException("Error getting connection..");
    if ( conn == null )
    throw new FrameworkException("Error getting connection..");
         String[] textMsgs = new String[3];
         MessageManagerInter msgMgr = Architecture.getMessageManagerInstance();
         textMsgs[0] = msgMgr.getMessage("IBU_RG_CONTRACT24");
         //textMsgs[0] = " is not a valid employee email address.";
         textMsgs[1] = msgMgr.getMessage("IBU_RG_CONTRACT25");
         //textMsgs[1] = " Cannot get the employee id.";
         textMsgs[2] = msgMgr.getMessage("IBU_RG_CONTRACT13");
         //textMsgs[2] = "submitType is null, please check program.";
         if ( (submitType != null) && "LOGIN".equals( submitType ) )
         forwardURL="jtflogin.jsp";
         backURL="jtflogin.jsp";
         else if ( (submitType != null) && "EMPLOYEE_CHECK".equals( submitType ) )
         forwardURL="ibuemplcheck.jsp";
         backURL="ibuemplcheck.jsp";
         else if ( (submitType != null) && "EMPLOYEE_NUMBER_SUBMIT".equals( submitType ) )
         backURL="ibuemplcheck.jsp";
    emailAddress = (String) request.getParameter("emailAddress");     
         pageContext.setAttribute("emailAddress", emailAddress , PageContext.REQUEST_SCOPE);
         employeeID = IbuRegistration.getEmployeeID(conn,emailAddress);
         if (employeeID == -1)
              throw new IbuRegException(emailAddress + "  "+textMsgs[0] + "  " +textMsgs[1]);
         //validate employee
    currentStatus = Employee.isValidate(conn,emailAddress);
    //currentStatus = IbuRegistration.isEmployeeValid(conn,emailAddress);
         if (!currentStatus)
              throw new IbuRegException(emailAddress + "  " + textMsgs[0]);
         EmployeeInfo employee = Employee.findEmployee(conn,employeeID);
         pageContext.setAttribute("employee", employee , PageContext.REQUEST_SCOPE);
         pageContext.setAttribute("employeeIDStr", Long.toString(employeeID) , PageContext.REQUEST_SCOPE);
         forwardURL="ibuemplinput.jsp";
         else
         { // Cancel button was pressed
         throw new IbuRegException(textMsgs[2]);
         /* "ibuccsii.jsp"; */
         catch ( IbuException e )
    TransactionScope.setRollbackOnly();
         errorMessage = e.getMessage();      
         errorStack = IbuRegException.getStack(e);
         pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
         pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
         forwardURL = backURL;
         catch (IbuRegException e)
    TransactionScope.setRollbackOnly();
         errorMessage = e.getMessage();      
         errorStack = e.getStack();
         pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
         pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
         forwardURL = backURL;
         catch ( Exception e )
    TransactionScope.setRollbackOnly();
         errorMessage = e.getMessage();      
         errorStack = IbuRegException.getStack(e);
         pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
         pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
         forwardURL = backURL;
    //throw new FrameworkException( e , "IBU_UNEXPECTED_EXCEPTION");
         finally
    TransactionScope.releaseConnection( conn );
    TransactionScope.end ( lockx );
         if (forwardURL == null)
         forwardURL="jtflogin.jsp";
    %>
         <jsp:forward page= "<%= forwardURL %>" />
    <%@ include file="jtferlp.jsp" %>

    dear sir,
    i have to important question.
    i am pasting the code of a jsp file below.... please look in to this...Note that this is an OCI forum. Since your code is using Oracle's JDBC driver to connect, I would suggest posting in the JDBC forum for more information.
    in this page.. how is he making a database connection...
    try
    conn = (OracleConnection)
    TransactionScope.getConnection();
         catch ( Exception e )
    throw new FrameworkException("Error getting connection..");
    and in this page
    where are the select statements and queries.... There may be queries in the Employee objects or in the include files.
    Justin

  • How to use bean:write inside jsp:include ?

    I got a problem about JSP's syntax. The following is my code:
    <%@ include file="<bean:write name="HelloForm" property="target" />"%>
    The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    Include Directive vs <jsp:include>
    The include directive <%@include %> is done at page translation/compile time.
    It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
    As such, you cannot provide a runtime expression to it.
    To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
    <%String test = request.getParameter("pageInfo");%>
    <%String link = test + ".jsp"; %>
    <jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
    <jsp:include page="<%= HelloForm.getTarget() %>" />
    Cheers,
    evnafets

  • How to use analytical functions inside a mapping

    Hello everybody. Here Isend you a trick that we are using for two years.
    If you want to use a function (for instance :ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ...)) inside a mapping you must create an expression with in the INGRP1 the fields you are going to use in the window function and in the OUTGRP1 the function you want. Create an Out -attribute with the expressión and link it to a distinct operator (using a "distinct" you encapsulte the sql and you will be able to use the function inside a filter - in the where clause.). The distinct can eliminate some register (depends on the function). If you validate the expression an error will appear (don't worry about that, the mapping will be ok).
    But there is a limitation, you will not be able tou sum over, min over, max over (it detect that they are aggregator functions). Other limitation: the debugger doesn't run with this kind of functions.
    Please publish this information on "The Warehouse Builder Utility Exchange". Mi email is [email protected] (if you need more information)

    It is possible to add SUM, MIN, MAX functions also to OWB releases prior to Paris - You have to put them in double quotes - write "MIN" "MAX" "SUM" etc. The rest of the rules (adding cut-off operator after the expression - as DISTINCT, or UNION ALL) is analogical to with ROW_NUMBER()
    That means You can create mapping with following functionality:
    SELECT
    sum (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    writing it this way in OWB:
    SELECT
    "SUM" (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    Regards,
    Martin

  • How to use multiple statements inside the "THEN" block of CASE statement?

    Below is the code:
    SET @strTempString = case @strKeyMode
    WHEN 'AUTO/CYCLE'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'CYCLE'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'COMMERCIAL'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'ISNAP'
    THEN  set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + '  ', 2) + '  ', 2))))
    '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType
    WHEN 'ASNAP'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'MOAT'
    THEN  @strRefID + '|' + @strRetID
    else '0'
    end 
    The first 3 conditions are understandable. How to use multiple statements in 4th case?
    Here I first want to set the value as:
    set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + '  ', 2) + '  ', 2))))
    and then return the string '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType to @strTempString. 
    Please help me remove the syntax errors.
    Thanks in advance.

    Try below SQL
    DECLARE @strKeyMode varchar(20) = 'ISNAP'
    DECLARE @SQL VARCHAR(MAX)
    DECLARE @strRefID int=1
    DECLARE @strRetID INT=2
    --FIRST WAY
    IF @strKeyMode ='AUTO/CYCLE'
    SELECT CAST(@strRefID as varchar(10))
    ELSE IF @strKeyMode ='CYCLE'
    SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
    ELSE IF @strKeyMode='ISNAP'
    SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
    ELSE
    SELECT @SQL='ABC'
    print @sql
    ----SECOND WAY
    SELECT @SQL = CASE @strKeyMode
    WHEN 'AUTO/CYCLE' THEN CAST(@strRefID as varchar(10))
    WHEN 'CYCLE' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
    WHEN 'ISNAP' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
    ELSE 'No Record'
    END
    PRINT (@SQL)
    --Prashanth

  • How to use OMBPLUS activity inside process flow

    Hi, I’m using OWB 11.2.0.3.
    In a process flow, I need to use an OMBPLUS activity. When I run the process flow, it runs successfully and says: “Log file is available. Click Information button to view.” 
    -Where is the log file, OWB is talking about?
    -Is there any sample of using OMBPLUS activity inside a process flow?
    THANKS, au revoir!

    Thanks, Dallan
    Articles on "Oracle Warehouse Builder (OWB) Weblog" really help me.
    So, I understand that I can't resume process flow in Control Center - only in Repository Browser. :)
    IMHO, this is something puzzled and missmatch with official Users Guide

  • How to use interface return value in workflow task

    Hi all,
    My team developed a proxy(interface) to fetch a field from web application(Non SAP) through PI. i tested that interface in SAP, its working fine. Interface is having one input, one output.
    Input - from SAP(employee number)
    Output - from webapplication (manager number).
    In my workflow, i have to use that manager number in decission task. For that i created a task, but in that task, iam unable to use the class and method name which is mentioned above. its giving an error "Interface implementation IF_WORKFLOW does not exist".
    Please guide me, how to use that interface output in my workflow.
    Regards
    Arani Bhaskar

    "Interface implementation IF_WORKFLOW does not exist".
    This error is triggered because the class which you are using in the task does not have included and implemented the interface IF_WORKFLOW , if at all you want to use any class methods in the workflow, then that class must supprot the interface IF_WORKFLOW
    what you can do is 
    1. Include the interface IF_WORKFLOW in the class that you are using to fetch the manager number,
    2. Make the method as Static Method .
    3. Just implement all the methods , I mean just double click each method of the interface, clcik on pretty printer and save it, to just implement all the methods.
    3. Do the appropriate bindings .
    And finally just execute the txn SWU_OBUF and click Shift+F1.
    this will help you to retrive the manager number intot the workflow

  • WTA: How to use output type with medium T (Task)

    Dear Gurus,
    Can anyone shed some light how to use output medium T?
    I tried one but at the end the output analysis says: Task T 50000125 is not available for object category BUS2032
    My task clearly calling BUS2032 with method DELETEBILLINGBLOCK
    Anyone can advise?
    Please don't focus on the DELETEBILLINGBLOCK and suggest me workaround how to remove billing block.
    It just my sample as I just anyhow select random method.
    What I need to know is how to use medium T.
    Thanks in advance.

    Hello Erwin,
    I know this is an incredibly old post, but I am wondering if you found a resolution to this issue.  I have the same issue and cannot determine why I can see the enter in NAST for an output resulting from a condition record set as medium 9 with timing of 3.  If I am in display mode of the sales order I can see it and also see the record in NAST.  Like you, if I change the medium to Print, it proposes as expected in VA01, VA02, VA03.  If I have the medium of 9, and change the timing to 4, my workflow process executes as expected.
    Please let me know if you have any thoughts on how to resolve.
    Thanks!
    Jan

  • How to Deploy the Scheduler Task OIM 11g

    Hi.
    I have deployed the scheduler task in OIM 11g and also I have configured the Scheduler task in OIM Admin Console. The Java Scheduler class was not invoked when I run the Scheduler task.
    I have done the following configuration to develop and deploy the scheduler task in OIM.
    1) Developing the Java Class File.
    package edu.sfsu.oim11g.scheduler;
    import java.util.HashMap;
    import oracle.iam.scheduler.vo.TaskSupport;
    import edu.sfsu.oim11g.logger.SfsuLogger;
    public class SfsuTrustedSourceReconciliation extends TaskSupport {
         //private Logger logger= Logger.getLogger(SfsuTrustedSourceReconciliation.class);
         private SfsuLogger logger= new SfsuLogger("SFSU-LOGGER");
         private String className=this.getClass().getCanonicalName();
         private String methodName="";
         public SfsuTrustedSourceReconciliation() {
              methodName="SfsuTrustedSourceReconciliation";
              debug("SfsuTrustedSourceReconciliation() Called");
         @Override
         public void execute(HashMap arg0) throws Exception {
              // TODO Auto-generated method stub
              methodName="execute";
              debug("SfsuTrustedSourceReconciliation Arguments "+arg0);
         @Override
         public HashMap getAttributes() {
              // TODO Auto-generated method stub
              return null;
         @Override
         public void setAttributes() {
              // TODO Auto-generated method stub
         private void debug(Object message)
              logger.info(className+" : "+methodName+" : "+message);
    2) Custom Scheduler XML File
    This file is located in
    /home/oracle/confg_files/schedulers/db/SfsuTrustedSourceReconciliation.xml
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
         <task>
         <name>SfsuTrustedSourceReconciliation</name>
              <class>edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation</class>
              <description>Reconciliation IDSync Data</description>
              <retry>5</retry>
              <parameters>
                   <string-param required="true" encrypted="false" helpText="Source Data Source">Source Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Config Data Source">Config Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Reconciliation Type is Full Or Cincremental. Default is Incremental">Reconciliation Type</string-param>
                   <number-param required="true" encrypted="false" helpText="Max Records" >Max Records</number-param>
              </parameters>
         </task>
    </scheduledTasks>
    3) Plugin File Configuration.
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="edu.sfsu.oim11g.eventhandlers.SfsuPostProcessEventHandler" version="1.0" name="SfsuPostprocessExtension"/>
    </plugins>
    <plugins pluginpoint="oracle.iam.scheduler.vo.TaskSupport">
    <plugin pluginclass="edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation" version="1.0" name="SfsuTrustedSourceReconciliation"/>
    </plugins>
    </oimplugins>
    The event handler is successfully deployed and working fine without any issue.
    4) making the scheduler jar file.
    5) Making the scheduler zip with the following directory format.
    plugin.xml
    lib/scheduler.jar
    6) Registering the Schedule task and event handler as a Plugin.
    ant -f pluginregistration.xml register
    7) Importing the SfsuTrustedSourceReconciliation.xml file into the MDS.
    7.1) weblogic.properties
    wls_servername=oim_server1
    application_name=oim
    metadata_from_loc=/home/oracle/configfiles/schedulers
    7.2) Running the weblogicImportMetadata.sh file
    It imported the SfsuTrustedSourceReconciliation.xml file into the MDS Schema and it is available in the MDS_PATH table in MDS schema
    Path_Name : SfsuTrustedSourceReconciliation.xml
    PATH_FULL : /db/SfsuTrustedSourceReconciliation.xml
    8) Imported the EventHandlers.xml file into the MDS Schema.
    9) Run the PurgeCache.sh file
    10) Restarted the OIM Server.
    11) Loggin into the OIM Admin Console and Created the Scheduler job based on the SfsuTrustedSourceReconciliation listed in the scheduler.
    12) Run the Scheduler job and log file entries are not logged into the log file. My Log File Configuration
    <log_handler name='sfsu-handler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='/u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/servers/oim_server1/logs/sfsu-connector.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    </log_handler>
    <logger name="SFSU-LOGGER" level="FINEST" useParentHandlers="false">
    <handler name="sfsu-handler"/>
    <handler name="console-handler"/>
    </logger>
    Is there any special configuration Do i need to do invoke my Scheduler Java Class File.
    Help is Greatly Appreciated.

    Seems like you did it all right but just piece which if you can modify and test. The plugin.xml has two artifacts eventhandler and the schduler. Can you try creating separate plugin.xml with one for the scheduler zipped up with /lib/scheduleClass.jar and test it?
    Just deregister everything before trying it and let us know how it goes.
    Also the logger as I see is a custom logger, so it is extending the OOTB Logger? Just put some sysouts in the code and check for those in the server out file to be sure.
    Edited by: bbagaria on Jul 22, 2011 5:15 PM

Maybe you are looking for

  • Question: 10gR2 database can not see the 11gR2 ASM diskgroup?

    Hi there, env: uname -rm 2.6.18-92.1.22.el5xen x86_64 Single server(non-RAC) note: we don't want to upgrade 10gr2 database into 11gR2 yet. But we created the 11gR2 ASM, then a 11gr2 database on ASM, and plan to migrate datafile in 10gR2 database to 1

  • Black bar on left will not go away and covers slides

    WHen we use keynote a black vertical see through bar appeared on left covering the slides. This bar will not disappear and we can't access the individual slides anymore. CAn anyone help please. THanks

  • Graphing data of different data point amounts I get errors

    I'm using Labview 7.1 and I'm graphing a group of data sets on a single graph display. These data sets have different numbers of total points and the sets with a less number of points wind up going back to the origin (0,0). This seems to be due to wh

  • LR 1.1 changes image dimensions in Develop review after rotation

    I rotate an image in the library and then go to view it in develop, and it is resized or scaled to the same dimensions as the horizontal image. This is putting on more than 10 pounds onto my models. Anyone else have this problem? Find a solution? Thi

  • Needing .INF file for HP Photosmart 7760

    I have an HP7760 connected & shared on a Win7[64bit] desktop. I am trying to print to the HP7760 from another LAN wired desktop AND from a wireless HP laptop. "add network printer" DOES find the HP7760 but is asking for the .INF,.IN_ file for this pr