Inline transform for Sql Query not working in SAP MII 12.1 Version 12.1.8 B

Hi All,
I applied an xslt for an sql query which returns an xml file.
I used inline transform icon in sql query to load an xsl file which has to return me a string
Any idea why is not working for me..?
My Sample XML file:
                                 <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/XMII/CM/BatchDisposition/BatchQueueManagement/StyleSheets/ProductXsl.xsl"?>
<Rowsets DateCreated="2011-05-05T07:27:45" EndDate="2011-05-05T07:27:45" StartDate="2011-05-05T06:27:45" Version="12.1.8 Build(20)">
     <Rowset>
          <Columns>
               <Column Description="ProductName" MaxRange="1" MinRange="0" Name="ProductName" SQLDataType="12" SourceColumn="ProductName"/>
          </Columns>
          <Row>
               <ProductName>Asprin 100mg Tablets 12 x10 strip</ProductName>
          </Row>
          <Row>
               <ProductName>Asprin 300mg Tablets 12 x10 strip</ProductName>
          </Row>
          <Row><ProductName>Ibprooven 200mg Tablets 12 x 10 strip</ProductName></Row>
          <Row><ProductName>RipTide 50mg Tablets 40 x10 strip</ProductName></Row>
          <Row><ProductName>Seroquel 200mg Tablets 6 x10 strip</ProductName></Row>
          <Row><ProductName>Seroquel 400mg Tablets 12 x10 strip</ProductName></Row>
     </Rowset>
</Rowsets>
My Sample XSl File:
                                <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
     <xsl:text>["</xsl:text>
     <xsl:for-each select="Rowsets/Rowset/Row">
          <xsl:value-of select="ProductName"/>
          <xsl:if test="position() &lt; last()">
               <xsl:text>","</xsl:text>
                </xsl:if>
          <xsl:if test="position()=last()">
                       <xsl:text>"]</xsl:text>
                </xsl:if>
     </xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Any Suggestions  are Welcome:
Thanks

Something like this should work...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="/">
          <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
               <xsl:copy-of select="/Rowsets/FatalError"/>
               <xsl:copy-of select="/Rowsets/Messages"/>
               <Rowset>
               <Columns>
                    <Column Description="Mycol1" MaxRange="1" MinRange="0" Name="Mycol1" SQLDataType="12" SourceColumn="Mycol1" />
               </Columns>
               <Row>
               <Mycol1>
               <xsl:text>["</xsl:text>
                    <xsl:for-each select="/Rowsets/Rowset/Row">
                         <xsl:value-of select="." />
                         <xsl:choose>
                              <xsl:when test="position() &lt; last()"><xsl:text>","</xsl:text></xsl:when>
                              <xsl:otherwise><xsl:text>"]</xsl:text></xsl:otherwise>
                         </xsl:choose>
                    </xsl:for-each>
               </Mycol1>
               </Row>
               </Rowset>
          </Rowsets>
     </xsl:template>
</xsl:stylesheet>

Similar Messages

  • SQL Query Not working

    Hi All,
    Please help with the error ORA-00923: FROM keyword not found where expected.
    I am trying to execute the following SQL query.
    SELECT
    CASE
    WHEN (Grouping("PRICECATEGORY"."PriceCategoryName")=1) THEN "PriceCatTotal"
    ELSE "PRICECATEGORY"."PriceCategoryName"
    END AS "PRICECATEGORY"."PriceCategoryName",
    CASE
    WHEN (Grouping("LINEITEM"."LineDescription")=1) THEN "LineTotal"
    ELSE "LINEITEM"."LineDescription"
    END AS "LINEITEM"."LineDescription" ,
    *"INVOICE"."InvoiceDate",*
    Sum("TRANSACTION"."TotalPrice") as "TotalPrice",
    Sum("INVOICE_CHILD"."QUANTITY") as "Quantity"
    FROM "LINEITEM","INVOICE","TRANSACTION","PRICECATEGORY", "INVOICE_CHILD"
    WHERE "TRANSACTION"."InvoiceID"="INVOICE"."InvoiceNumber"
    and      "TRANSACTION"."PriceCategoryID"="PRICECATEGORY"."PriceCategoryID"
    and      "INVOICE_CHILD"."INVOICEID"="INVOICE"."InvoiceID"
    and      "PRICECATEGORY"."PriceCategoryID"="TRANSACTION"."PriceCategoryID"
    and      "TRANSACTION"."PriceCategoryID"="PRICECATEGORY"."PriceCategoryID"
    and      "PRICECATEGORY"."PriceCategoryID"="TRANSACTION"."PriceCategoryID"
    and      "LINEITEM"."LINEITEMID"="TRANSACTION"."LineItemID"
    and      "LINEITEM"."PRICECATEGORYID"="PRICECATEGORY"."PriceCategoryID"
    and     "INVOICE"."InvoiceDate" >= :STARTDATE and "INVOICE"."InvoiceDate" <= to_date(:ENDDATE,'DD-MON-YY')+1
    GROUP BY "PRICECATEGORY"."PriceCategoryName", "LINEITEM"."LineDescription" WITH ROLLUP
    I am using a from keyword at the right place and all the aliases are properly used.
    Please advice.
    Regards,
    Sandeep Reddy

    Jaydip and Jeff are correct:
    <li>Jaydip points out that <tt>"PRICECATEGORY"."PriceCategoryName"</tt> and <tt>"LINEITEM"."LineDescription"</tt> are not valid column alias names. They must be unqualified, nonquoted/quoted identifiers.
    <li>Jeff indicates that <tt>WITH ROLLUP</tt> is not Oracle SQL syntax, and provides a sample of the required ROLLUP/CUBE clauseOracle SQL <tt>ROLLUP/CUBE clause</tt>.
    Additionally, <tt>TRANSACTION</tt> is an Oracle keyword and therefore a poor choice as a database identifier: change the name of this table as soon as possible.
    You're having this problem because not all "SQL" is created equal. Your OdeToCode source appears to be a site dealing with Microsoft technologies (SQL Server in this case). Unless you are very familiar with Oracle and SQL Server and the inherent differences between them you'd be advised to stick to purely Oracle resources (I know I do). There are plenty of good Oracle resources out there.
    You'll also find it a lot easier to write, read and spot problems in SQL and PL/SQL code if you avoid using quoted identifiers (please tell us the database objects don't have case-sensitive names?) and use short table aliases rather than full table names. And we'll find it easier to help you on this forum if you post code samples wrapped in \...\wrapped in <tt>\...\</tt> tags.

  • Select for update query not working..

    hi i am tying to get this bit of ncode to work so i can then go to the next part of demonstrating a deadlock between two transactions. however i cannot go any further has my initial code does not work at all. here it goes
    //////////User A////////////////////////////////
    DECLARE
    v_salary squad.salary%TYPE := 300;
    v_pos squad.position%TYPE := 'Forward';
    BEGIN
    UPDATE squad
    SET salary = salary + v_salary
    WHERE sname = 'Henry';
    FOR UPDATE;
    UPDATE squad
    SET position = v_pos
    WHERE sname = 'Fabregas';
    COMMIT;
    END;
    //////////////////////User B/////////////
    DECLARE
    v_salary squad.salary%TYPE := 200;
    v_pos squad.position%TYPE := 'Forward';
    BEGIN
    UPDATE squad
    SET position = v_pos
    WHERE sname = 'Fabregas';
    FOR UPDATE;
    UPDATE squad
    SET salary = salary + v_salary
    WHERE sname = 'Henry';
    FOR UPDATE;
    COMMIT;
    END;
    Basicly user a creats a lock and so does user b, user b enquires a lock from user a and vice versa i.e. a deadlock

    Hi
    You get the following error:
    ORA-06550: line 8, column 7:
    PLS-00103: Encountered the symbol "UPDATE" when expecting one of the following:
    because the FOR UPDATE; is invalid in your statement.
    Try this:
    //////////User A////////////////////////////////
    DECLARE
    v_salary squad.salary%TYPE := 300;
    v_pos squad.position%TYPE := 'Forward';
    v_n number;
    BEGIN
    UPDATE squad
    SET salary = salary + v_salary
    WHERE sname = 'Henry';
    select 1 into v_n from squad
    WHERE sname = 'Fabregas'
    for update;
    UPDATE squad
    SET position = v_pos
    WHERE sname = 'Fabregas';
    COMMIT;
    END;
    //////////////////////User B/////////////
    DECLARE
    v_salary squad.salary%TYPE := 200;
    v_pos squad.position%TYPE := 'Forward';
    v_n number;
    BEGIN
    UPDATE squad
    SET position = v_pos
    WHERE sname = 'Fabregas';
    select 1 into v_n from squad
    WHERE sname = 'Henry'
    for update;
    UPDATE squad
    SET salary = salary + v_salary
    WHERE sname = 'Henry';
    COMMIT;
    END;
    To syncronize the blocks first in a SQLPlus call these two statements:
    select 1 from squad WHERE sname = 'Fabregas' for update;
    select 1 from squad WHERE sname = 'Henry' for update;
    After this start the user A code in another SQLPlus, and start the user B code. After this call rollback or commit in the first sqlplus.
    Ott Karesz
    http://www.trendo-kft.hu

  • SQL Query not working for column names with spaces

    Hi People..
    We have a strange situation wherein, the column name in the database table has a space inbetween like "Constant Name". While we write a JDBC statement code with the select query we get an exception for invalid syntax. It will help us in a great way if you have anything to inform us on this..
    Thanks
    Prabz

    Using case sensitive names and names with spaces in it is not a good practice.
    However, I believe the SQL standard accounts for this with quoted identifiers. I believe the syntax is
    . select "My Field1", "My Field2"
    . from "My Table'
    Have also seen the following although it might be MS Access specific.
    . select [My Field1], [My Field2]
    . from [My Table]

  • SQL Query not working in action performed event of combobox in swing

    hi all..
    i have to retreive from the database based on the item selected in the comboBox.......
    when the program runs for the first time the data of defaultselected item is being displayed...
    but when another item is selected the data is not retrieved from the database....
    i am able to print the selected item but unable to query the database for the selected item
       private void resultsItemStateChanged(java.awt.event.ItemEvent evt) {                                        
    // TODO add your handling code here:
            try{
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conn = DriverManager.getConnection("jdbc:odbc:aa");
                System.out.println("you have selected me : --- >" + results.getSelectedItem().toString());
                sql="SELECT * FROM " + name + " WHERE term = ? ";
                srch2 = conn.prepareStatement(sql);
                srch2.setString(1,results.getSelectedItem().toString());
                rs2 = srch2.executeQuery();
                rs2.next();
                tarea2.setText("\n Definition:"+rs1.getString(3));
                tarea3.setText("\n Description:"+rs1.getString(4));
                tarea4.setText("\n Related Terms:"+rs1.getString(5));
                tarea5.setText("\n Hyperlinks : "+rs1.getString(6));
                tarea6.setText("\n References:"+rs1.getString(7));
                conn.close();
                rs2.close();
            } catch(Exception e){}
    }    please help me to query the database for the selected item
    Thanks in advance...

    hi all..
    i have to retreive from the database based on the item selected in the comboBox.......
    when the program runs for the first time the data of defaultselected item is being displayed...
    but when another item is selected the data is not retrieved from the database....
    i am able to print the selected item but unable to query the database for the selected item
    private void resultsItemStateChanged(java.awt.event.ItemEvent evt) {                                        
    // TODO add your handling code here:
          ResultSet rs2=null;
           PreparedStatement srch2 = null;
            Connection conn1= null;
            Statement us = null;
            try{
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conn1 = DriverManager.getConnection("jdbc:odbc:aa");
               System.out.println("you have selected me : --- >" + results.getSelectedItem().toString());
                 sql="SELECT * FROM " + name + " WHERE term = ?";
                srch2 = conn.prepareStatement(sql);
                srch2.setString(1,results.getSelectedItem().toString());
                rs2 = srch2.executeQuery();
               rs2.next();
                tarea2.setText("\n"+rs1.getString(3));
                tarea3.setText("\n "+rs1.getString(4));
                tarea4.setText("\n"+rs1.getString(5));
                tarea6.setText("\n"+rs1.getString(6));
                tarea5.setText("\n"+rs1.getString(7));
              rs2.close();
              conn1.close();
            } catch(Exception e){
                System.out.println(e);
        After printing for the first time it is showing like this ...
    java.sql.SQLException: ResultSet is closed
    at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(JdbcOdbcResultSet.java:6646)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:257)
    at more_info.resultsActionPerformed(more_info.java:301)
    at more_info.access$100(more_info.java:25)
    at more_info$2.actionPerformed(more_info.java:121)
    at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1242)
    at javax.swing.JComboBox.setSelectedItem(JComboBox.java:569)
    at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:605)
    at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:814)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

  • SQL query not working well

    Hi,
    I made a small table with 5 rows and want to make them an sql consult using rownum
    so I'm running
    select * from mytable where rownum = 1;and it gives me the first row but if I change the 1 for a 2 or 3 or 4 or 5 it's says that theres nothing :S
    why?????????????????????
    but if i change for between 1 and 5 it gave me the 4 rows :S :S
    why???????????????????

    AlanWms wrote:
    try this:
    SELECT *
    FROM (
    SELECT bne.*, rownum myrow
    FROM BAN_EVENTOS_CONFIRMACION bne WHERE ROWNUM <=5)
    WHERE myrow = 2;
    Wrong!!! Rows in table are not stored in any specific order. Rows are fetched based on execution plan. So if execution plan changed query will retrieve same rows but they can be fetched in a different order. Bottom line only ORDER BY guarantees order. Without ORDER BY there is no sense to talk about first row, second row, last row or any row position.
    SY.

  • Help SQL Query (Not working as it should)

    Hello everybody,
    I'm using JDeveloper 12.1.2.0.0 . I'm doing a bidirectional comunication using 3 tables, with bindings between them (and using HR schema).
    In my example, i have something like:
    Departments, Employees and SalaryByJobs (i created this table where it shows the departmentd id, employee id, job, salary).
    Whenever i click on one OR more departments, the employees table update by putting on the table, the employees that belong to the selected department and the salaryByjob put the jobs by employees selected on the employees table.
    So it's something like this:
    Departments selected -> employees selected -> salarybyjbobs of those employees.
    My Employees query (in the view) has the following code:
    SELECT Employees.COMMISSION_PCT,
           Employees.DEPARTMENT_ID,
           Employees.EMAIL,
           Employees.EMPLOYEE_ID,
           Employees.FIRST_NAME,
           Employees.HIRE_DATE,
           Employees.JOB_ID,
           Employees.LAST_NAME,
           Employees.MANAGER_ID,
           Employees.PHONE_NUMBER,
           Employees.SALARY
    FROM  EMPLOYEES Employees
    WHERE ( DEPARTMENT_ID IN (select * from THE(select cast( in_list(:variavel3) as mytableType ) from dual ) a))
    Since i use bindings, the employees table don't show anything in the beginning, so i added this parte to my employees query: OR nvl(:variavel3,0) = 0
    But now, whenever i try to select more than one row, it gives me invalid numbers and i don't understand why..
    It's only more one line of code and it's not in the bean.
    Can anyone help me?
    Ps - The bean goes department by department, appends the departments with "," and for each department, gets the employees that belongs to them.
    My best regards,
    Frederico Barracha.

    The expression NVL(:variavel3,0)=0 is not correct. The datatype of the return value of the NVL function is considered equal to the datatype of the 1st argument (i.e to the datatype of the bind variable :variavel3). You said that this variable contained a comma-separated list of IDs, so the variable's datatype is VARCHAR2. As far as you are comparing the NVL-expression to a number, you get "Invalid number" exception, because Oracle is expecting a numeric datatype at the left side of the comparison operator.
    In order to avoid the "Invalid number" exception you can modify the expression using one of the following options:
    :variavel3 IS NULL
    NVL( :variavel3, '*' ) = '*'
    NVL( :variavel3, '0' ) = '0'
    The 1st option if the simplest and the most clear one.
    Dimitar

  • My menu query not working in SAP 2007

    My menu saved queries was working fine in SBO 2005 when it is executed without any date or parameter all the datas will show in that database but in SBO 2007 the same query is not showing any datas if executed without date.Please help with this

    If you mean the user queries created in B1 2005, then some of them have to be changed because the database structure has been changed between two versions.
    Thanks,
    Gordon

  • Style is not working in SAP MII 14.0 SP4

    Hi All,
    I am trying to use "style" as per below. When I try to load the page I am loading the image and when chart appears I am disabling that.
    But whereever the style is used I am not getting the result.
    I have tried by putting it in css too. but no result.
    <!DOCTYPE HTML>
    <HTML>
    <HEAD>
      <TITLE>Ingots - BM Crushed Report</TITLE>
      <META http-equiv="X-UA-Compatible" content="IE=edge">
      <META http-equiv='cache-control' content='no-cache'>
      <META http-equiv='expires' content='0'>
      <META http-equiv='pragma' content='no-cache'>
      <link href="/XMII/CM/MTS/Stylesheets/FitToPage.CSS" type="text/css" rel="stylesheet">
      <SCRIPT language="JavaScript">
      function loadapp()
      var SD = document.getElementById("StartDateId").value;
      var ED = document.getElementById("EndDateId").value;
      var app = document.APP_IngotBMCrushed;
      var chartapp = app.getQueryObject();
      document.getElementById("AppLoading").style.display ="inline";
      document.getElementById("ChartApp").style.display ="none";
      chartapp.setStartDate(SD);
      chartapp.setEndDate(ED);
      app.updateChart(true);
      document.getElementById("AppLoading").style.display ="none";
      document.getElementById("ChartApp").style.display ="inline";
      </SCRIPT>
    </HEAD>
    <FORM>
    <BODY onload="loadapp();">
      <TABLE width="100%" height="100%">
      <TR>
      <TD align="center" id="AppLoading" style="display:none" colspan="4"><img src="/XMII/CM/MTS/Images/loading.gif" width="100px" height="100px" ></TD>
      </TR>
      <TR>
      <TD id="ChartApp"  style="display:none">
      <APPLET NAME="APP_IngotBMCrushed"   CODEBASE="/XMII/Classes" CODE="iChart" ARCHIVE="illum8.zip"  WIDTH="100%" HEIGHT="100%"  TABINDEX=1 MAYSCRIPT>
      <PARAM NAME="QueryTemplate" VALUE="MTS/QT/IngotsAndBMCrushedReportSQLQuery"/>
      <PARAM NAME="DisplayTemplate" VALUE="MTS/DT/IngotsAndBMCrushedReportChart"/>
      </APPLET>
      </TD>
      </TR>
      </TABLE>
    </BODY>
    </FORM>
    <input type="hidden" id="StartDateId" value="{StartDate}">
    <input type="hidden" id="EndDateId" value="{EndDate}">
    </HTML>
    But when I use style its throwing error in java console as below
    Exception in thread "AWT-EventQueue-14" java.lang.IllegalArgumentException: Width (-4) and height (-41) cannot be <= 0
      at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
      at java.awt.image.BufferedImage.<init>(Unknown Source)
      at com.sap.xmii.common.ui.GUIUtilities.createImage(GUIUtilities.java:107)
      at com.sap.xmii.common.ui.GUIUtilities.createImage(GUIUtilities.java:94)
      at com.sap.xmii.applet.chart.ChartComponent.layoutComponents(ChartComponent.java:546)
      at com.sap.xmii.applet.chart.ChartComponent.redraw(ChartComponent.java:4585)
      at com.sap.xmii.applet.chart.ChartApplet$1.run(ChartApplet.java:187)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
    I have upgraded the jre too but same error.
    Please let me know the solution.
    Regards
    R.Prakash

    Hi Christian,
    I have changed it to px. But now I am getting the following error.
    java.lang.NullPointerException
    at com.sun.deploy.security.CPCallbackHandler.isAuthenticated(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler.access$1300(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.sap.xmii.applet.common.BaseApplet.stop(BaseApplet.java:1408)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Also my loading image is not appearing?
    Regards
    R.Prakash

  • Oracle date parameter query not working?

    http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
    Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
    Delete
    from CONCURRENCYTESTITEMS
    where ITEMID = :xItemId
    and ROWVERSION = :xRowVersion_prev
    The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
    The same code & query works in Sql Server, but not Oracle.
    Public Function CreateConnection() As IDbConnection
    Dim sl As New SettingsLoader
    Dim cs As String = sl.ObtainConnectionString
    Dim cn As OracleConnection = New OracleConnection(cs)
    cn.Open()
    Return cn
    End Function
    Public Function CreateCommand(connection As IDbConnection) As IDbCommand
    Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
    cmd.BindByName = True
    Return cmd
    End Function
    <TestMethod()>
    <TestCategory("Oracle")> _
    Public Sub Test_POC_Delete()
    Dim connection As IDbConnection = CreateConnection()
    Dim rowver As DateTime = DateTime.Now
    Dim id As Decimal
    Using cmd As IDbCommand = CreateCommand(connection)
    cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.ReturnValue
    p.DbType = DbType.Decimal
    p.ParameterName = "myOutputParameter"
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion"
    v.Value = rowver
    cmd.Parameters.Add(v)
    cmd.ExecuteNonQuery()
    id = CType(p.Value, Decimal)
    End Using
    Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
    cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.Input
    p.DbType = DbType.Decimal
    p.ParameterName = "xItemId"
    p.Value = id
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion_prev"
    v.Value = rowver
    v.Precision = 6 '????
    cmd.Parameters.Add(v)
    Dim cnt As Integer = cmd.ExecuteNonQuery()
    If cnt = 0 Then Assert.Fail() 'should delete
    End Using
    connection.Close()
    End Sub
    Schema:
    -- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
    CREATE TABLE "CONCURRENCYTESTITEMS" (
    "ITEMID" NUMBER(19,0) NOT NULL,
    "NOTES" NCHAR(200) NOT NULL,
    "ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
    STORAGE (
    NEXT 1048576 )
    Sequence:
    -- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
    CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
    START WITH 1
    CACHE 20
    MAXVALUE 9999999999999999999999999999

    still not comming...
    i have one table each entry is having only one fromdata and one todate only
    i am running below in sql it is showing two rows. ok.
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  '830' and  '850'  and t1.U_frmdate ='20160801'  and  t1.u_todate='20160830'
    in commond promt
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  {?FromEmid} and  {?ToEmid} and t1.U_frmdate ={?FDate} and  t1.u_todate={?TDate}
    still not showing any results..

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • Early Adopter release : Extract DDL for tables does not work

    Hi,
    just had a look at Raptor - really nice tool - easy install - could be a replacement for SQLnavigator for us. One or two things I noticed though ...
    1)
    Export->DDL for tables does not work throws following error
    java.lang.ClassNotFoundException: oracle.dbtools.raptor.dialogs.actions.TableDMLExport
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at oracle.ideimpl.IdeClassLoader.loadClass(IdeClassLoader.java:140)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at oracle.dbtools.raptor.dialogs.BasicObjectModifier.launch(BasicObjectModifier.java:142)
         at oracle.dbtools.raptor.dialogs.BasicObjectModifier.handleEvent(BasicObjectModifier.java:210)
         at oracle.dbtools.raptor.dialogs.actions.XMLBasedObjectAction$DefaultController.handleEvent(XMLBasedObjectAction.java:265)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:530)
         at oracle.ide.controller.IdeAction$1.run(IdeAction.java:785)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:804)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:499)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    and 2)
    when I click on a package body - I get "loading ..." below it but it never puts the
    procedure names in and the "loading ..."message stays in the tree view - however you do get to see the packages in the source window.
    Realise this is very much a work in progress and am grateful to see an early release such as this. Looking forward to the production release.
    Best regards,
    David.

    OK thanks for looking ....you've obviously got the fixes on your to do lists
    Noticed that the SQL tab when you select an object works fine - displays the
    DDL for the object
    Do you think you'll have functionality so you can select many objects (shift left click) and
    then create a DDL script for them? It looks like you can do this for all objects in a schema but
    the ability to select a subset of objects in a schema would be very useful for our DBA's.
    Couldn't see any good reason for keeping using SQLNavigator
    Many congratulations on producing such a useful tool.
    Kind regards,
    David.

  • Force encryption on SQL Server not working?

    Hello Everyone,
    I'm running SQL Server 2008 64-bit. I've installed a self-signed cert on the box and set  "Force Encryption"  and restarted SQL server. 
    I setup a client machine to trust the authority of the cert installed on the server. When I connect to that SQL server from SSMS from a client machine and select the "encrypt connection" option in the client Connection properties, SSMS correctly complains
    that the cert on the server does not match the computer name I asked to log into . This is because, although the cert is trusted, the dns name dos not match the CN in the cert <- Perfect, exactly what I am expecting.
    When I connect to the same SQL server from the same client but  UNCHECK "encrypt connection" on the client, I'm able to login. Considering I've checked the "Force Encryption" on the server, the server should have rejected the connection. Why not?
    Ameer Deen

    Hi all,
    We are implementing a Merge Synchronization solution which involves three SQL Servers located on three Azure locations worldwide and one on-premises location. We need to secure communications between all servers. We are evaluating the encryption of all server
    communications through SSL:
    http://technet.microsoft.com/en-us/library/ms191192.aspx
    When we configure one server (let’s call it server A) to accept only encrypted connections (with Force Encryption=Yes) we still can connect from other server (let’s call it server B) that do not have the certificate installed. We would expect the server
    B to fail in the attempt of connect as server A should only accept encrypted communications and those should need the certificated to encrypt/decrypt everything (commands and data).
    We have also review the following forum post that is very similar to this one:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bde679d9-ff83-4fa7-b402-42e336a97106/force-encryption-on-sql-server-not-working
    In all cases the Microsoft answer is:
    “When the
    Force Encryption option for the Database Engine is set to YES, all communications between client and server is encrypted no matter whether the “Encrypt
    connection” option (such as from SSMS) is checked or not. You can check it using the following DMV statement”
    When we run the provided DMV statement to check if encryption is enabled:
    -- To check whether connections are encrypted between server and clients
    SELECT encrypt_option
    FROM sys.dm_exec_connections
    We get “TRUE”. So theoretically encryption is enabled.
    Then:
    Why can we run SQL statements against server A from server B (with SSMS) without any certificate?
    Are we wrong when we expect server A to refuse any client that do not have the right certificate?
    How can server B, without any certificate, decrypt the data encrypted by server A?
    Our intention is to encrypt all server in the same way so all of them will accept only encrypted communications. We are assuming that the Merge Agent will be able to communicate with the Publisher and the Subscriber through this encrypted environment. May
    anyone please confirm ti?
    Thanks for your help.
    Best Regards
    Benjamin Moles

  • F4 help for 0MAT_SALES is not working in BI 7

    Hi Gurus,
    The F4 help for 0MAT_SALES is not working when distibution channel is selected as (!=02) in Bex Analyzer. But for all other values for distibution channel  i am getting values in F4 help.
    Since 02 is excluded it is supposed to give values for all other combination. but it not so.
    Could anyone of you please help me on this?
    Thanks in advance.

    Closing Thread

  • Short key for copy does not work all the time now.

    After I have installed the latest OSX - Yosemite, my short key for copy does not work all the time.  It is infrequent how it works. I'm using the same keyboard that I have always used, my wireless logitech keyboard for mac.  Please help.

    I've plugged in my default mac keyboard and the short key copy still does not work.

Maybe you are looking for