Error with sql commands with ms access

hi!
I'm having problems with sending commands like "create group x" and "alter database password" these aren't working.
I'm using the jdbcodbc bridge. Simply doing this:
Statement stmt = con.createStatement();
stmt.executeUpdate ("alter database password a null");
doesn't work.
create group also don't work. Surely other stuff also don't work. But things like create table, drop table, create proc, do work.
I can't do all the stuff that appears here.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acadvsql.asp
What may be happenning?
can all that really work from java just like this or it don't?
I'm using Access 2002 with access 2000 db format.
Thanks.
Greeting from chile.

Well may be I am ignorant. I'm doing a real thing (for somebody) for the first time. They will buy few pcs. Also I think I would like they update to access 2000 or 2002 from 97 because of the semi stored procedures... They will do a lot of effort to just buy that but they really need it.
I just actually wanted the ability to mantain users and assign permissions to do stuff from the same application. That would have been nice but it is not critical, at least execute procedures does work.

Similar Messages

  • Need help with SQL Query with Inline View + Group by

    Hello Gurus,
    I would really appreciate your time and effort regarding this query. I have the following data set.
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*20.00*-------------19
    1234567----------11223--------------7/5/2008-----------Adjustment for bad quality---------44345563------------------A-----------------10.00------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765--------------------I---------------------30.00-------------19
    Please Ignore '----', added it for clarity
    I am trying to write a query to aggregate paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number. When there are no multiple records I want to display the respective Description.
    The query should return the following data set
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*10.00*------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765-------------------I---------------------30.00--------------19
    The following is my query. I am kind of lost.
    select B.Description, A.sequence_id,A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
    from (
    select sequence_id,check_date, check_number, invoice_number, sum(paid_amount) amount, vendor_number
    from INVOICE
    group by sequence_id,check_date, check_number, invoice_number, vendor_number
    ) A, INVOICE B
    where A.sequence_id = B.sequence_id
    Thanks,
    Nick

    It looks like it is a duplicate thread - correct me if i'm wrong in this case ->
    Need help with SQL Query with Inline View + Group by
    Regards.
    Satyaki De.

  • Procedure compilation failed with SQL command not properly ended error

    Hi All,
    Kindly help me to fix this.
    I am compiling a procedure and getting an error. Procedure and error details are as follows:
    Procedure:
    CREATE or REPLACE PROCEDURE jiostore_new.auditReportCount (u_name IN VARCHAR2,stdate IN DATE,eddate IN DATE)
    IS
    BEGIN
    DECLARE Total Number;
    BEGIN
    SELECT COUNT(am.id) into Total FROM auditMaster_ AS am  INNER JOIN jioworld.deviceos_ dvos ON dvos.id=am.deviceOs WHERE am.updatedBy=u_name or am.updatedBy=ALL AND DATE(am.updatedDate)>=stdate OR DATE(am.updatedDate)='0000-00-00' AND DATE(am.updatedDate)<=eddate or DATE(am.updatedDate)='0000-00-00';
    dbms_output.put_line('Total Count:' || Total);
    END;
    END;
    Error:
    Error(6,1): PL/SQL: SQL Statement ignored
    Error(6,50): PL/SQL: ORA-00933: SQL command not properly ended
    Regards,
    Vishal G

    2922723 wrote:
    Hi All,
    Kindly help me to fix this.
    I am compiling a procedure and getting an error. Procedure and error details are as follows:
    Procedure:
    CREATE or REPLACE PROCEDURE jiostore_new.auditReportCount (u_name IN VARCHAR2,stdate IN DATE,eddate IN DATE)
    IS
    BEGIN
    DECLARE Total Number;
    BEGIN
    SELECT COUNT(am.id) into Total FROM auditMaster_ AS am  INNER JOIN jioworld.deviceos_ dvos ON dvos.id=am.deviceOs WHERE am.updatedBy=u_name or am.updatedBy=ALL AND DATE(am.updatedDate)>=stdate OR DATE(am.updatedDate)='0000-00-00' AND DATE(am.updatedDate)<=eddate or DATE(am.updatedDate)='0000-00-00';
    dbms_output.put_line('Total Count:' || Total);
    END;
    END;
    Error:
    Error(6,1): PL/SQL: SQL Statement ignored
    Error(6,50): PL/SQL: ORA-00933: SQL command not properly ended
    Regards,
    Vishal G
    The first thing, is that for your own sanity you should learn to format your code for readability.  And for the sanity of those from whom you seek help, you should learn to preserve that formatting when you post to a forum:
    CREATE OR REPLACE PROCEDURE jiostore_new.auditReportCount(
        u_name IN VARCHAR2,
        stdate IN DATE,
        eddate IN DATE)
    IS
    BEGIN
      DECLARE
        Total NUMBER;
      BEGIN
        SELECT COUNT(am.id)
        INTO Total
        FROM auditMaster_ AS am
        INNER JOIN jioworld.deviceos_ dvos
        ON dvos.id              =am.deviceOs
        WHERE am.updatedBy      =u_name
        OR am.updatedBy          =ALL
        AND DATE(am.updatedDate)>=stdate
        OR  DATE(am.updatedDate) ='0000-00-00'
        AND DATE(am.updatedDate)<=eddate
        OR  DATE(am.updatedDate) ='0000-00-00';
        dbms_output.put_line('Total Count:' || Total);
      END;
    END;
    What is the data type of am.updateDate?  It appears to be a varchar being passed to a function named DATE to convert it to a DATEfor comparison to your input parameters,  But you also compare it to strings. 
    Where are the variables 'u_name' and 'ALL'?  (and what kind of a name is that for a variable -- 'ALL'?)

  • SQL command (with XPath) does not work properly with JSP

    Hello everyone,
    I try this SQL command on Oracle SQL Developer,
    select filename,
    extract(xml_col, '/Operation/Records/tabDetail/Vehicle_Level/text()') as Vehicle_Level,
    extract(xml_col, '/Operation/Records/tabDetail/Vehicles_Closed/text()') as Vehicles_ID
    from ope
    where upload_datetime in
    (select min(upload_datetime)
    from ope
    where (TO_DATE(TO_CHAR(upload_datetime, 'DD-MM-YYYY'),'DD-MM-YYYY'))
    between TO_DATE('01-01-2008','DD-MM-YYYY') and TO_DATE('01-07-2008','DD-MM-YYYY')
    HAVING (filename like '60-1-%')
    GROUP BY filename);
    It works properly, the result is :
    FILENAME --------------------- VEHICLE_LEVEL --------------------- VEHICLES_ID
    60-1-OPE-1.xml --------------------- 3 --------------------- 60-1-VEH-43
    But when I try this command on JSP, the result is :
    FILENAME --------------------- VEHICLE_LEVEL --------------------- VEHICLES_ID
    60-1-OPE-1.xml --------------------- null --------------------- null
    I don't want "null" value, but I don't know where is wrong. Please help me.
    Thank you very much.
    Orange Jasmin

    If you know that the videos and music have been working before and that the ID3 tags are correct I suggest that you try to reinstall the phone software using Update Service.
    http://www.sonymobile.com/gb/tools/update-service/
    Let me know if these problems remains after reinstall.
     - Community Manager Sony Xperia Support Forum
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • I cannot get trace file with sql command

    Hi,
               When I am executing the below command in SQLPLUS I could not find trace files in /oracle/(sid)/sap trace/ user trace directory. The command is
    >alter database backup control file to trace;
    I have executed this command with (sid)adm and ora(sid) .
    Our oracle version is 9.2.0.
    Please help on this
    Regards
    Nani

    Hi
             The file under /oracle/SDB/saptrace/usertrace showing below error
    pg sdb_ora_24618.trc
    /oracle/SDB/saptrace/usertrace/sdb_ora_24618.trc
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.7.0 - Production
    ORACLE_HOME = /oracle/SDB/920_64
    System name:    HP-UX
    Node name:      sandbox
    Release:        B.11.23
    Version:        U
    Machine:        ia64
    Instance name: SDB
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 0
    24618
    Ioctl ASYNC_CONFIG error, errno = 1
    Regards
    Nani

  • Delete IFS file with sql command

    Hi
    Is it possible to remove a file from IFS using an sql command? If so, what is it?
    Thanks
    Hugo

    No, this is not possible, nor is it supported. You may use the Java API to delete a file.

  • Slow Report Load Speed with SQL Command

    I have the following SQL Command in my Crystal Report.  When I add the "SalesOrderDeliveries.omdDeliveryDate" to the report it examines 240,000 records and takes 3 minutes to completely load the report.  However, if I do not include this, it only examines 137,000 and only takes 10 seconds to run.
    Why is this slowing down the report and running through more records than when it is omitted from the report?
    SELECT
      SalesOrderDeliveries.omdDeliveryDate,
      SalesOrderDeliveries.omdSalesOrderID,
      Jobs.jmpJobID
    FROM dbo.Jobs
    INNER JOIN dbo.SalesOrderJobLinks
      ON Jobs.jmpJobID = SalesOrderJobLinks.omjJobID
    INNER JOIN dbo.SalesOrders
      ON SalesOrderJobLinks.omjSalesOrderID = SalesOrders.ompSalesOrderID
    INNER JOIN dbo.SalesOrderLines
      ON SalesOrders.ompSalesOrderID = SalesOrderLines.omlSalesOrderID
    INNER JOIN dbo.SalesOrderDeliveries
      ON SalesOrderLines.omlSalesOrderID = SalesOrderDeliveries.omdSalesOrderID
    WHERE SalesOrderDeliveries.omdShippedComplete = 0
    AND Jobs.UJMPPMTRACK = -1
    GROUP BY Jobs.jmpJobID,
             SalesOrderDeliveries.omdDeliveryDate,
             SalesOrderDeliveries.omdSalesOrderID
    ORDER BY SalesOrderDeliveries.omdSalesOrderID

    Try doing something like this for your query:
    SELECT
      qryNextDate.nextDate,
      qryNextDate.omdSalesOrderID,
      Jobs.jmpJobID
    FROM dbo.Jobs
    INNER JOIN dbo.SalesOrderJobLinks
      ON Jobs.jmpJobID = SalesOrderJobLinks.omjJobID
    INNER JOIN dbo.SalesOrders
      ON SalesOrderJobLinks.omjSalesOrderID = SalesOrders.ompSalesOrderID
    INNER JOIN dbo.SalesOrderLines
      ON SalesOrders.ompSalesOrderID = SalesOrderLines.omlSalesOrderID
    INNER JOIN (
      select omdSalesOrderID, min(omdDeliveryDate) as nextDate
      from dbo.SalesOrderDeliveries
      where omdShippedComplete = 0
      group by omdSalesOrderID) as qryNextDate
      ON SalesOrderLines.omlSalesOrderID = qryNextDate.omdSalesOrderID
    where Jobs.UJMPPMTRACK = -1
    ORDER BY SalesOrderDeliveries.omdSalesOrderID
    This will get you just the minimum delivery date for each order, which should be the "next" due date.
    -Dell

  • Runtime Error in SQL command ..

    Hi everybody
    I have a report wich terminates with a dump message.
    The error is in an SQL command, here the program aborts:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL
        INTO TABLE I_KNKK
        FROM KNKK
       WHERE KUNNR IN R_KUNNR
         AND KKBER IN R_KKBER
         AND SBGRP IN S_SBGRP.
    DATA: BEGIN OF I_KNKK OCCURS 0,
          KUNNR LIKE KNKK-KUNNR,
          KKBER LIKE KNKK-KKBER,
          KLIMK LIKE KNKK-KLIMK,
          SAUFT LIKE KNKK-SAUFT,
          SKFOR LIKE KNKK-SKFOR,
          SSOBL LIKE KNKK-SSOBL,
          SBGRP LIKE KNKK-SBGRP,
          END OF I_KNKK.
    In first moment, i saw the table and SQL filter have the SBGRP field but the SQL fields selection has not this field. But, these same program works good with others selection parameters, in fact this SQL only terminates the program for the bigest company, wich causes the program make many BD access because all previous SQL.
    The dump log says:
    Runtime errors         DBIF_RSQL_INVALID_RSQL
    Exception              CX_SY_OPEN_SQL_DB
    Occurred on            23.05.2006 at   17:27:15
    Error in the module RSQL accessing the database interface.
    An exception occurred. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB',  neither caught nor passed along using a RAISING clause, in the procedure "(FORM)" . Since the caller of the procedure could not have expected this except to occur, the running program was terminated.
    The reason for the exception is:
    The SQL statement generated from the SAP Open SQL Statement violates restriction imposed by the database system used in R/3.
    Possible errors:
    o The maximum size of an SQL statement has been exceeded.
    o The statement contains too many input variables.
    o The space needed for the input data exceeds the   
        available memory.
    o ...
    How can i be sure the dump is for a lot of BD access for all the SQL commands ?
    If these is the error, does somebody knows how can i eliminate this error ?
    Please help ..
    Regards
    Frank

    I think the field discrepancy is a red herring here. Not guilty! I agree that using the 'CORRESPONDING FIELDS OF' is safer though.
    The error could be happening because your range variables have lots of entries in them which makes the generated sql huge.
    To break it up you could use the 'package size' option of the select. This will work it's way through the input in chunks (or packages) of the size you specify.
    You could change it to:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    INTO TABLE I_KNKK package size 2000 "or a variable value      
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    process current contents of i_knkk here                                           
    endselect.     
    or ,
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    appending TABLE I_KNKK package size 2000       
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    endselect.

  • Please help with SQL command

    Hi,
    I'm trying to update a record but I don't know how to update one field in this record. This is my code so far
    private void updateProcess() {
    int nrows;
    String sql = "UPDATE student SET s_first = '" + txtS_first.getText()
         + "', s_mi = '" + txtS_mi.getText()
         + "', s_last = '"      + txtS_last.getText()
         + "', s_dob = TO_DATE('" + txtS_dob.getText() + "', 'MM/DD/YYYY')"
    /* In a database table, after the s_dob column is f_id column, but a user will see info of this field by f_first and f_last instead of f_id. How can I update this column with f_id if a user's input is f_first and f_last? What if f_first and f_name that a user enters doesn't exist in the database, is there anyway to display an error for this case?
         + "', f_first = '" + txtF_first.getText()
         + "', f_last = '" + txtF_last.getText()
         + "' WHERE s_id = " + txtS_id.getText();
    try {
         nrows = stmt.executeUpdate(sql);
    // I think this part I'm doing wrong because the text area doesn't display these strings
         if(nrows > 0) {
         lblShowResult.setText("Update successed");
         lblShowResult.setVisible(true);
    } // end if
    else {
         lblShowResult.setText("Update failed");
    lblShowResult.setVisible(true);
    } // end else
         rset.close();
    } // end try
    catch (SQLException e) {}
    catch (NullPointerException e){}
    } // end updateProcess

    If you read the docs for executeUpdate, you'll see that it returns the number of rows affected. So if it returns zero, then no rows matched.
    Also, you should be using PreparedStatement rather than Statement. Then you won't have to worry about weird characters in strings or formatting dates (you can just give it a java.sql.Date object).

  • Help with sql command for inventory cost change report

    Inventory Cost Changes within date range.
    Columns on report
    Item LastDateChanged CurrentCost PriorCost
    Source File-TransHst (Type 14 is inventory cost change)
    example data
    Type,Item,DtChg,Cost
    14,15825,02/01/2014,357.00
    14,45832,03/15/2014,95725.00
    14,15825,10/01/2013,322.00
    14,45832,06/22/2012,94632.00
    example output needed
    Item   LastDateChanged CurrentCost PriorCost
    15825     02/01/2014                 357.00               322.00    
    Using Crystal Reports 2008 with Oracle Database
    I cannot create sql to retrieve data to create report.
    Need Item, Last Change Date, Current Cost and Prior Cost as output of sql
    Thanks

    HI Jerry,
    I don't know real syntax of your database, try below SQL, you may have to modify the syntax wherever it is required.
    Select t.Item, Max(t.DtChg),(case when year(t.dtchg) = Year(sysdate) then t.Cost else 0) as currentCost,
    (case when year(t.dtchg) = Year(sysdate)-1 then t.Cost else 0) as PriorCost
    From TransHst t
    Where Type=14
    Group by t.Item
    Thanks,
    Sastry

  • Error in sql server with a trigger (I want to display a customize message, when the user left a blank field or null) How can I do?

    How I display a customize message(with a trigger)when a user left a blank field? I want to the stop the insert statament if the user left  the status field in blank. I create a trigger but now I can't enter a row, i used an instead trigger
    too but doesn't work. I want to display a customize message when the user left the
    status field in blank or null. 
     I have the following code:
    CREATE TRIGGER [dbo].[BLANKFIELD] 
    ON [dbo].[Status] 
    FOR INSERT 
    AS 
    BEGIN 
    IF (SELECT COUNT(*) FROM inserted WHERE Status IS NULL) =1
     PRINT 'Please Fill the Status  field is required'
    Rollback;
    END 

    I agree with other comments that you should do this with specifying that the column is NOT NULL to prevent it from being NULL and a constraint if you don't want it to be blank (spaces or the empty string - note that the empty string is not the same thing
    as NULL).
    But for completeness, the reason your trigger does not ever allow you to enter a row is the code
    IF (SELECT COUNT(*) FROM inserted WHERE Status IS NULL) =1
    PRINT 'Please Fill the Status field is required'
    Rollback;
    Since you don't have a begin/end block after IF, the only conditionally executed statement is the one immediately following the IF (that is the PRINT).  So the Rollback is always executed whether or not the IF is true and so all updates are rejected.
    So if you were to do this in a trigger you could do something like the following
    CREATE TRIGGER [dbo].[BLANKFIELD]
    ON [dbo].[Status]
    FOR INSERT
    AS
    BEGIN
    IF EXISTS(SELECT * FROM inserted WHERE Status IS NULL)
    BEGIN
    PRINT 'Please Fill the Status field is required';
    Rollback;
    END
    END
    (As José noted, there can be more than one row in the inserted pseudo table, so you don't want to test whether the COUNT = 1, instead just whether one or more rows exist where the Status  is null.  If you want to prevent Status is NULL, or all
    spaces, or the empty string, then your IF statement would be
    IF EXISTS(SELECT * FROM inserted WHERE ISNULL(Status, '') = '')
    Tom

  • Error using bind variables with SQL server with SQL92 mode

    I am using 2 bind variable in my VO (JDBC positional) . The mode is SQL 92 for ADF BC. I do not use the bind variable directly but in a view criteria. I see following error in the logs.
    The logs show the query executed and error.  I tried both ways - making bind variable required and not required. I have set -Djbo.SQLBuilder=SQLServer property. My other page works which has an updatable VO.
    JDEV version is - JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493
    <ViewObjectImpl> <getQueryHitCount> [4567] Estimated Row Count for ViewObject: [oracle.epm.fm.bc4j.queries.admin.UserOnSystemROVO]AdministrationAM.UserOnSystemROVO1, Query Statement:
    <ViewObjectImpl> <getQueryHitCount> [4568] "SELECT count(1) FROM (SELECT * FROM (SELECT
        TABLE1.SUSERNAME USERNAME,
        TABLE2.SMODULENAME MODULENAME,
        TABLE2.LACTIVITYCODE ACTIVITYCODE,
        TABLE2.DSTARTTIME STARTTIME,
        TABLE2.SSERVERNAME SERVERNAME,
        TABLE2.SAPPNAME APPNAME,
        TABLE2.LSESSIONID SESSIONID,
        TABLE2.LSESSIONSTATUS SESSIONSTATUS,
        TABLE2.LUSERID USERID,
        TABLE2.DSTILLALIVETS STILLALIVETS,
        TABLE2.LTASKID TASKID,
        TABLE2.SACTIVITYDESC ACTIVITYDESC,
        TABLE1.LUSERID USERID1,
        TABLE1.SUSERDESC USERDESC
    FROM
        TABLE2 TABLE2,
        TABLE1 TABLE1
    WHERE
        TABLE2.LUSERID = TABLE1.LUSERID) QRSLT  WHERE ( ( ( ( UPPER(SERVERNAME) = UPPER(?)  )  OR  ( ? IS NULL ) ) AND ( ( UPPER(APPNAME) = UPPER(?)  )  OR  ( ? IS NULL ) ) ) )) ESTCOUNT"
    <ViewObjectImpl> <getQueryHitCount> [4569] Bind params for ViewObject.getQueryHitCount: UserOnSystemROVO1
    <ViewRowSetImpl> <doSetWhereClauseParam> [4570] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(0, null, null)
    <ViewRowSetImpl> <doSetWhereClauseParam> [4571] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(1, null, null)
    <ViewRowSetImpl> <doSetWhereClauseParam> [4572] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(4, null, null)
    <ViewRowSetImpl> <doSetWhereClauseParam> [4573] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(5, null, null)
    <ViewRowSetImpl> <doSetWhereClauseParam> [4574] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(2, null, null)
    <ViewRowSetImpl> <doSetWhereClauseParam> [4575] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(3, null, null)
    <ADFLogger> <addContextData> Estimated row count
    <BaseSQLBuilderImpl> <bindParamValue> [4576] Binding null of type 12 for 1
    <BaseSQLBuilderImpl> <bindParamValue> [4577] Binding null of type 12 for 2
    <BaseSQLBuilderImpl> <bindParamValue> [4578] Binding null of type 12 for 3
    <BaseSQLBuilderImpl> <bindParamValue> [4579] Binding null of type 12 for 4
    <BaseSQLBuilderImpl> <bindParamValue> [4580] Binding null of type 12 for 5
    <ViewObjectImpl> <getQueryHitCount> [4581] ViewObjectImpl.getQueryHitCount failed...
    <ViewObjectImpl> <getQueryHitCount> [4582] java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Invalid parameter binding(s).
      at weblogic.jdbc.sqlserverbase.dda4.b(Unknown Source)
      at weblogic.jdbc.sqlserverbase.dda4.a(Unknown Source)
      at weblogic.jdbc.sqlserverbase.dda3.b(Unknown Source)
      at weblogic.jdbc.sqlserverbase.dda3.a(Unknown Source)
      at weblogic.jdbc.sqlserverbase.ddb8.a(Unknown Source)
      at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
      at weblogic.jdbc.sqlserverbase.ddb9.setNull(Unknown Source)
      at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:622)
      at oracle.jbo.server.BaseSQLBuilderImpl.bindParamValue(BaseSQLBuilderImpl.java:2215)
      at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
      at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22684)
      at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4944)
      at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4857)
      at oracle.jbo.server.QueryCollection.getEstimatedRowCount(QueryCollection.java:4204)
      at oracle.jbo.server.ViewRowSetImpl.getEstimatedRowCount(ViewRowSetImpl.java:2677)
      at oracle.jbo.server.ViewObjectImpl.getEstimatedRowCount(ViewObjectImpl.java:10632)

    After making all the bind variables not required, the error is no longer coming.

  • Issue with SQL Query with Presentation Variable as Data Source in BI Publisher

    Hello All
    I have an issue with creating BIP report based on OBIEE reports which is done using direct SQL. There is this one report in OBIEE dashboard, which is written using direct SQL. To create the pixel perfect version of this report, I am creating BIP data model using SQL Query as data source. The physical query that is used to create OBIEE report has several presentation variables in its where clause.
    select TILE4,max(APPTS), 'Top Count' from
    SELECT c5 as division,nvl(DECODE (C2,0,0,(c1/c2)*100),0) AS APPTS,NTILE (4) OVER ( ORDER BY nvl(DECODE (C2,0,0,(c1/c2)*100),0))  AS TILE4,
    c4 as dept,c6 as month FROM 
    select sum(case  when T6736.TYPE = 'ATM' then T7608.COUNT end ) as c1,
         sum(case  when T6736.TYPE in ('Call Center', 'LSM') then T7608.CONFIRMED_COUNT end ) as c2,
         T802.NAME_LEVEL_6 as c3,
         T802.NAME_LEVEL_1 as c4,
         T6172.CALENDARMONTHNAMEANDYEAR as c5,
         T6172.CALENDARMONTHNUMBERINYEAR as c6,
         T802.DEPT_CODE as c7
    from
         DW_date_DIM T6736 /* z_dim_date */ ,
         DW_MONTH_DIM T6172 /* z_dim_month */ ,
         DW_GEOS_DIM T802 /* z_dim_dept_geo_hierarchy */ ,
         DW_Count_MONTH_AGG T7608 /* z_fact_Count_month_agg */
    where  ( T802.DEpt_CODE = T7608.DEPT_CODE and T802.NAME_LEVEL_1 =  '@{PV_D}{RSD}' 
    and T802.CALENDARMONTHNAMEANDYEAR = 'July 2013'
    and T6172.MONTH_KEY = T7608.MONTH_KEY and T6736.DATE_KEY = T7608.DATE_KEY
    and (T6172.CALENDARMONTHNUMBERINYEAR between substr('@{Month_Start}',0,6)  and substr('@{Month_END}',8,13))
    and (T6736.TYPE in ('Call Center', 'LSM')) )
    group by T802.DEPT_CODE, T802.NAME_LEVEL_6, T802.NAME_LEVEL_1, T6172.CALENDARMONTHNAMEANDYEAR, T6172.CALENDARMONTHNUMBERINYEAR
    order by c4, c3, c6, c7, c5
    ))where tile4=3 group by tile4
    When I try to view data after creating the data set, I get the following error:
    Failed to load XML
    XML Parsing Error: mismatched tag. Expected: . Location: http://172.20.17.142:9704/xmlpserver/servlet/xdo Line Number 2, Column 580:
    Now when I remove those Presention variables (@{PV1}, @{PV2}) in the query with some hard coded values, it is working fine.
    So I know it is the PV that's causing this error.
    How can I work around it?
    There is no way to create equivalent report without using the direct sql..
    Thanks in advance

    I have found a solution to this problem after some more investigation. PowerQuery does not support to use SQL statement as source for Teradata (possibly same for other sources as well). This is "by design" according to Microsoft. Hence the problem
    is not because different PowerQuery versions as mentioned above. When designing the query in PowerQuery in Excel make sure to use the interface/navigation to create the query/select tables and NOT a SQL statement. The SQL statement as source works fine on
    a client machine but not when scheduling it in Power BI in the cloud. I would like to see that the functionality within PowerQuery and Excel should be the same as in Power BI in the cloud. And at least when there is a difference it would be nice with documentation
    or more descriptive errors.
    //Jonas 

  • Error creating SQL Command - Database Expert

    I am creating a command however when I go to save the SQL I get two errors.
    "Failed to retrieve data from database" and "Failed to execute SQL Statement"
    I am working on an Oracle database. 
    Why would these errors be occuring?

    SELECT
    "CI_ACCT_PER"."ACCT_ID", "CI_ACCT_PER"."ACCT_REL_TYPE_CD", "CI_ACCT_PER"."PER_ID", "CI_ACCT_PER"."MAIN_CUST_SW", "CI_ACCT_PER"."FIN_RESP_SW", "CI_ACCT"."ACCT_ID",
    "CI_PER"."PER_OR_BUS_FLG", "CI_PER"."CITY", "CI_PER"."POSTAL", "CI_PER"."GEO_CODE", "CI_PER"."STATE", "CI_PER"."COUNTRY", "CI_PER_NAME"."PER_ID", "CI_PER_NAME"."ENTITY_NAME", "CI_PER_NAME"."NAME_TYPE_FLG", "CI_PER_NAME"."PRIM_NAME_SW",
    "CI_SA"."SA_ID", "CI_SA"."SA_TYPE_CD", "CI_SA"."SA_STATUS_FLG", "CI_SA_REL"."SA_REL_ID", "CI_SA_REL"."SA_ID", "CI_SA_REL"."SA_REL_STATUS_FLG", "CI_SA_REL"."SA_REL_USAGE_FLG", "CI_SA_REL"."SPR_CD", "CI_SA_REL"."SA_REL_TYPE_CD", "CI_SA"."CHAR_PREM_ID",
    "CI_SPR"."SA_ID", "CI_SPR"."PER_ID",
    "CI_PREM"."ADDRESS1", "CI_PREM"."PREM_ID",
    "CI_SA_RS_HIST"."EFFDT", "CI_SA_RS_HIST"."RS_CD"
    FROM ((((((("CISADM"."CI_SA" "CI_SA" LEFT OUTER JOIN "CISADM"."CI_ACCT" "CI_ACCT" ON "CI_SA"."ACCT_ID"="CI_ACCT"."ACCT_ID")
    LEFT OUTER JOIN "CISADM"."CI_SA_REL" "CI_SA_REL" ON "CI_SA"."SA_ID"="CI_SA_REL"."SA_ID")
    LEFT OUTER JOIN "CISADM"."CI_PREM" "CI_PREM" ON "CI_SA"."CHAR_PREM_ID"="CI_PREM"."PREM_ID")
    LEFT OUTER JOIN "CISADM"."CI_SA_RS_HIST" "CI_SA_RS_HIST" ON "CI_SA"."SA_ID"="CI_SA_RS_HIST"."SA_ID")
    LEFT OUTER JOIN "CISADM"."CI_ACCT_PER" "CI_ACCT_PER" ON "CI_ACCT"."ACCT_ID"="CI_ACCT_PER"."ACCT_ID")
    LEFT OUTER JOIN "CISADM"."CI_PER" "CI_PER" ON "CI_ACCT_PER"."PER_ID"="CI_PER"."PER_ID")
    LEFT OUTER JOIN "CISADM"."CI_PER_NAME" "CI_PER_NAME" ON "CI_PER"."PER_ID"="CI_PER_NAME"."PER_ID")
    LEFT OUTER JOIN "CISADM"."CI_SPR" "CI_SPR" ON "CI_SA_REL"."SPR_CD"="CI_SPR"."SPR_CD"
    WHERE "CI_PER_NAME"."PRIM_NAME_SW"='Y'
    AND "CI_ACCT_PER"."MAIN_CUST_SW"='Y'
    AND "CI_ACCT_PER"."FIN_RESP_SW"='Y'
    AND "CI_SA_REL"."SA_REL_STATUS_FLG"='A'
    and "CI_SA_RS_HIST"."EFFDT"<date(2009,1,1)
    ORDER BY "CI_SA_REL"."SPR_CD", "CI_SA"."SA_ID", "CI_ACCT_PER"."ACCT_ID", "CI_ACCT_PER"."PER_ID"

  • Update Multiple Column with Single Command with Join between Two tables.

    This is our command where we are trying to update a table's two columns by pulling values from another table after joining. This query takes too much time to execute. Any suggestions ?
    UPDATE raw_alc_rmfscombinednew
    SET (BSC, CELL_NAME) =
    SELECT distinct raw_alc_R110combinednew.BSC, raw_alc_R110combinednew.CELL_NAME
    FROM raw_alc_R110Combinednew
    WHERE
    raw_alc_R110Combinednew.OMC_ID = raw_alc_rmfscombinednew.OMC_ID
    AND raw_alc_R110Combinednew.CELL_CI = raw_alc_rmfscombinednew.CI
    AND RAW_ALC_R110COMBINEDNEW.START_TIME = RAW_ALC_RMFSCOMBINEDNEW.START_TIME
    Results of Last execution:
    Elapsed Time (sec) 4,476.56
    CPU Time (sec) 4,471.88
    Wait Time (sec) 4.68
    Executions that Fetched all Rows (%) 100.00
    Average Persistent Mem (KB) 32.43
    Average Runtime Mem (KB) 31.59
    --------------------------------------------------------------

    Your update requires a full execution of the subquery for each row in the destination table (raw_alc_rmfscombinednew). Try rewriting as a MERGE. Tons faster.
    MERGE INTO raw_alc_rmfscombinednew  D
          USING ( SELECT distinct
                         BSC,
                         CELL_NAME
                         START_TIME
                    FROM raw_alc_R110Combinednew )  S
             ON (    S.OMC_ID     = D.OMC_ID
                 AND S.CELL_CI    = D.CI
                 AND S.START_TIME = D.START_TIME )
        WHEN MATCHED THEN
          UPDATE
             SET D.BSC        = S.BSC,
                 D.CELL_NAME  = S.CELL_NAME

Maybe you are looking for

  • I updated last night and now my ipod touch is stuck in recovery mode and I don't want to do a factory restore!

    How do I get out of recovery mode, that my ipod touch suddenly went into, after updating last night? It does not recognize my ipod anymore and I don't want to restore it back to factory conditions. I have tons of things on the ipod and don't want to

  • Query output

    Hi, I have SERVER_UID_RPT table with the following details. table consist of records of entry & exit for the employees. But i want to query those user which have only entry granted but the exit granted entry is not there in table for the user & vice

  • Unable to create a Driver object from driver with Media type string CTC PHO

    Hi All, I am trying to develop a siebel cti adapter for avaya. I have loaded a custom dll into siebel server but it is throwing error "SBL-CSR-00500: Unable to create a Driver object from driver C:\Mydriver\cti.dll with Media-Type-String CTC Phone ".

  • STR-DH810, Panasonic plasma, and Wii

    Haven't seen any discussion in 2011 yet concerning the STR-DH810 AV receiver, so I think I'm safe posting a new message. Cannot get Nintendo Wii to display properly when connected through the receiver. Connection from Receiver-to-TV is a decent HDMI

  • How do I delete the new Photos and go back to iPhoto?

    I really don't care for the weak editing ability in the new Photos app.  But when I tried to go back to iPhoto, it was grayed out and no longer available.  How can I get my iPhoto back.  I'm on Yosemite 10.10.3.