PL/SQL throwing errors! trying to alter dates

the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values?
Can anyone see what I am doing wrong?
Here is the code, at the moment it is throwing an error on line 44
ORA-06550: line 44, column 1:
PLS-00103: Encountered the symbol "" when expecting one of the following:
CODE.....
DECLARE
     QNStart DATE;
     QNFinish DATE;
     Q1Start DATE;
     Q1Finish DATE;
     Q2Start DATE;
     Q2Finish DATE;
     Q3Start DATE;
     Q3Finish DATE;
     Q4Start DATE;
     Q4Finish DATE;
     Q5Start DATE;
     Q5Finish DATE;
     QNT NUMBER;
     Q1T NUMBER;
     Q2T NUMBER;
     Q3T NUMBER;
     Q4T NUMBER;
     QNR NUMBER;
     Q1R NUMBER;
     Q2R NUMBER;
     Q3R NUMBER;
     Q4R NUMBER;
BEGIN
     case current_date
          when current_date between to_date('01-JAN', 'DD-Mon') AND to_date('31-MAR', 'DD-Mon') then
                    QNStart := to_date('01-JAN', 'DD-Mon');
                    QNFinish := to_date('31-MAR', 'DD-Mon');
          when current_date between to_date('01-APR', 'DD-Mon') AND to_date('30-JUN', 'DD-Mon') then
                    QNStart := to_date('01-APR', 'DD-Mon');
                    QNFinish := to_date('30-JUN', 'DD-Mon');
          when current_date between to_date('01-JUL', 'DD-Mon') AND to_date('30-SEP', 'DD-Mon') then
                    QNStart := to_date('01-JUL', 'DD-Mon');
                    QNFinish := to_date('30-SEP', 'DD-Mon');
          when current_date between to_date('01-OCT', 'DD-Mon') AND to_date('31-DEC', 'DD-Mon') then
                    QNStart := to_date('01-OCT', 'DD-Mon');
                    QNFinish := to_date('31-DEC', 'DD-Mon');
     End Case
:Q1Start := ADD_MONTHS(:QNStart,-3);
:Q1Finish := ADD_MONTHS(:QNFinish,-3);
:Q2Start := ADD_MONTHS(:QNStart,-6);
:Q2Finish := ADD_MONTHS(:QNFinish,-6);
:Q3Start := ADD_MONTHS(:QNStart,-3);
:Q3Finish := ADD_MONTHS(:QNFinish,-3);
:Q4Start := ADD_MONTHS(:QNStart,-4);
:Q4Finish := ADD_MONTHS(:QNFinish,-4);
:Q5Start := ADD_MONTHS(:QNStart,-5);
:Q5Finish := ADD_MONTHS(:QNFinish,-5);
select COUNT(COUNT(*)) INTO :Q1T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q1Start AND :Q1Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q2T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q2Start AND :Q2Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q3T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q3Start AND :Q3Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q4T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q4Start AND :Q4Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :QNT from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :QNStart AND :QNFinish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q1R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
AND a.COMPANY_NAME IN
     (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
     WHERE f.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
     AND a.ACTION_SCORE = 'Y'
     AND f.INPUT_TYPE = a.ACTION_NAME
     GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q2R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
AND a.COMPANY_NAME IN
     (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
     WHERE f.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
     AND a.ACTION_SCORE = 'Y'
     AND f.INPUT_TYPE = a.ACTION_NAME
     GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q3R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
AND a.COMPANY_NAME IN
     (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
     WHERE f.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
     AND a.ACTION_SCORE = 'Y'
     AND f.INPUT_TYPE = a.ACTION_NAME
     GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q4R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
AND a.COMPANY_NAME IN
     (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
     WHERE f.DATE_ENTERED BETWEEN Q5Start AND Q5Finish
     AND a.ACTION_SCORE = 'Y'
     AND f.INPUT_TYPE = a.ACTION_NAME
     GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :QNR from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN QNStart AND QNFinish
AND a.COMPANY_NAME IN
     (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
     WHERE f.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
     AND a.ACTION_SCORE = 'Y'
     AND f.INPUT_TYPE = a.ACTION_NAME
     GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
EXECUTE
Cheers
Simon

Dave had given you already some good advice.
Your code is not only too complicated, but you have also probably a bug in it. You have for instance a QNstart as to_date('01.01, 'dd.mm') and a corresponding QNfinish as to_date('31.03', 'dd.mm'). As this means, it is the time portion at 00:01, you are missing the complete last day of this interval. So you better do:
declare
  l_QNstart      date;
  l_Q1start      date;
  l_Q1finish     date;
  l_q1t          number
begin
  l_QNstart := trunc(sysdate, 'Q');
  l_Q1start := add_months(l_QNstart, -3);
  l_Q1finish := l_QNstart;
  -- your condition is now
  select count(count(*))
  into   l_q1t
  from   ff_actions f, ff_action_type_lov a
  where  f.date_entered >= l_Q1start and f.date_entered < l_Q1finish
  and    a.action_score = 'y'
  and    f.input_type = a.action_name
  group by f.company_name;
end;
/Message was edited by:
Leo Mannhart
btw: what is the difference between Q1Start / Q3 Start and Q1Finish / Q3Finish resp.?

Similar Messages

  • Error: there is a problem connection to the GPRS service in your registered home network, error trying to make data connection. this may be casued by a voice call, a wired activesync connection or inncorrect network setting

    like 2 weeks ago i called in to att to see how much is the data plan and it would end up costing $30.
    so i was like screw that. well they figured that i got a new phone replacing the LG shine. so they asked
    for to call this number so they can recieve data which would updated the system that i have a plam treo 750.
    ever since this conflict i can't send picture messages. i get that problem. everytime i attempt to send a picture
    i recieve this.
    - there is a problem connection to the GPRS service in your registered home network.
    - then i get a test that says error trying to make data connection. this may be casued by a voice call,
    a wired activesync connection or inncorrect network setting.
    please someone help me.
    btw. hard reset and soft reset did not work for me.
    Post relates to: Treo 750 (AT&T)

    problem fix, i had to call in. customer serivce. and when i called to ask about the plan. they blocked it. so i had to unblock my internet.
    Post relates to: Treo 750 (AT&T)

  • PL/SQL function body returning SQL - report error:ORA-01403: no data found

    Hi,
    I am working on Application Express 4.0.2.00.06, and 11G database.
    I have a problem with classic report area of type - PL/SQL function body returning SQL query. Query works if I define region area as - Use Generic Column Names (parse query at runtime only), and does not when I define it - Use Query-Specific Column Names and Validate Query.
    I am getting error:
    report error:ORA-01403: no data found
    This is my query that is returned from function, and displayed with htp.p, and it works ok and returns data in SQL Developer and SQL Workshop (in Apex).
    <code>
    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
    </code>
    As you can see, I even tried with workaround that I found on the previous post on the forum, and that is to put /* select 1 from dual */ to start query.
    Any help would be appriciated.

    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA

  • HsqlDB throws exception-- trying to alter the columns from unique- primary

    Hi,
    I am trying to migrate my old DB Schema to a new DB schema and the underlying database is HsqlDB. One of the tables has two of its columns described as UNIQUE in the older schema, whereas they were made PRIMARY in the new schema. I went through the documentation provided by HSQL (http://www.hsqldb.org/doc/guide/ch09.html) and tried to execute the following query to alter the columns:
    stmt.execute("Alter Table user_type_table add primary key (user_type_name,attribute_name)");
    Somehow I get the following exception when I tried to do this:
    java.sql.SQLException: Wrong data type: KEY in statement [Alter Table user_type_table add primary key]
    at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
    Am i doing something wrong?

    Rich,
    Whichever column(s) you changed to generate the conflicts will be present in the logs anyway. Since, your prebuilt conflict handler is not set up for those columns, you end up with apply errors. You can remove those columns from being part of conflict detection by calling the DBMS_APPLY_ADM.COMPARE_OLD_VALUES procedure. Hope this helps.

  • SQL Interface - Error in Loading the data from SQL data source

    Hello,
    We have been using SQl data source for loading the dimensions and the data for so many years. Even using Essbase 11.1.1.0, it's been quite a while (more than one year). For the past few days,we are getting the below error when trying to load the data.
    [Mon Jan 10 11:02:56 2011]Local/{App Name}/{DB Name}/{User Id}/Info(1021013)
    ODBC Layer Error: [S1000] ==> [[DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for Windows, UNIX, and Linux]CURSOR IDENTIFIED IN FETCH OR CLOSE STATEMENT
    IS NOT OPEN (DIAG INFO: ).]
    [Mon Jan 10 11:02:56 2011]Local/{App Name}/{DB Name}/{User Id}/Info(1021014)
    ODBC Layer Error: Native Error code [4294966795]
    [Mon Jan 10 11:02:56 2011]Local/{App Name}/{DB Name}/{User Id}/Error(1021001)
    Failed to Establish Connection With SQL Database Server. See log for more information
    [Mon Jan 10 11:02:56 2011]Local/{App Name}/{DB Name}/{User Id}/Error(1003050)
    Data Load Transaction Aborted With Error [7]
    [Mon Jan 10 11:02:56 2011]Local/{App Name}///Info(1013214)
    Clear Active on User [Olapadm] Instance [1]
    Interestingly, after the job fails thru our batch scheduler environment, when I run the same script that's being used in the batch scheduler, the job completes successfully.
    Also, this is first time, I saw this kind of error message.
    Appreciate any help or any suggestions to find a resolution. Thanks,

    Hii Priya,
    The reasons may be the file is open, the format/flatfile structure is not correct, the mapping/transfer structure may not be correct, presence of invalid characters/data inconsistency in the file, etc.
    Check if the flatfile in .CSV format.
    You have to save it in .CSV format for the flatfile loading to work.
    Also check the connection issues between source system and BW or sometimes may be due to inactive update rules.
    Refer
    error 1
    Find out the actual reason and let us know.
    Hope this helps.
    Regards,
    Raghu.

  • SQL Loader error while loading a date field

    Hi,
    I am getting the below error while I am trying to load a table with a date field using SQL Loader
    Record 1: Rejected - Error on table RPT_HOST_USAGE, column USAGE_TIMESTAMP.
    ORA-01861: literal does not match format string
    My input file is as below
    <code>
    Host_Usage_ID,Host_ID,Technology_ID,Environment_ID,Usage_Timestamp,Avg_CPU_Pct,Avg_Memory_MB,CPU_Spike
    1,12,1,8,'2009-08-01 00:00:00',0.000000000,23875.000000000,0.000000000
    <code>
    My Loader.ctl is
    <code>
    OPTIONS (SKIP=1)
    load data
    infile 'C:\rpt_Host_Usage.txt'
    into table RPT_HOST_USAGE
    fields terminated by ","
    HOST_USAGE_ID,
    HOST_ID,
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP,
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    CPU_SPIKE
    <code>
    I have tried options like USAGE_TIMESTAMP TO_DATE(USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS') but didn't work...
    Can you please tell me how to resolve this issue?
    Any pointers on this will be helpful
    Thanks
    Mahesh

    I went back and looked at some of my old *.ctl files and I did something simlilar to what you mentioned and it worked for me, but I had surrounded the option in double-quotes and included a colon in front of the item. Example:
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP "to_date(:USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS')",
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    ....

  • SQL*LOADER ERROR WHILE LOADING ARABIAN DATA INTO UNICODE DATABSE

    Hi,
    I was trying to load arabic data using sql*loader and the datafile is in .CSV format.But i am facing a error Value to large for a column while loading and some data are not loaded due to this error.My target database character set is..
    Characterset : AL32UTF8
    National Character set: AL16UTF16
    DB version:-10g release 2
    OS:-Cent OS 5.0/redhat linux 5.0
    I have specified the characterset AR8MSWIN1256/AR8ISO8859P6/AL32UTF8/UTF8 separately in the sql*loader control file,but getting the same error for all the cases.
    I have also created the table with CHAR semantics and have specified the "LENGTH SEMANTICS CHAR" in the sql*loader control file but again same error is coming.
    I have also changed the NLS_LANG setting.
    I am getting stunned that the data that i am goin to load using sql*loader, it is resided in the same database itself.But when i am generating a csv for those datas and trying to load using sql*loader to the same database and same table structure,i am getting this error value too large for a column.
    whats the probs basically???? whether the datafile is problemetic as i am generating the csv programmetically or is there any problem in my approach of loading unicode data.
    Please help...

    Here's what we know from what you've posted:
    1. You may be running on an unsupported operating system ... likely not the issue but who knows.
    2. You are using some patch level of 10gR2 of the Oracle database but we don't know which one.
    3. You've had some kind of error but we have no idea which error or the error message displayed with it.
    4. You are loading data into a table but we do not have any DDL so we do not know the data types.
    Perhaps you could provide a bit more information.
    Perhaps a lot more. <g>

  • PowerBI throwing errors for validated OData data source

    Hi,
    I've been creating OData web services for various operations for months now, and validate the service output using odata.org for all versions of Odata (V1-V4)
    Yet when my co-worker tries to load one of these OData services as a data source, PowerBI throws this error:
    [DataSource.Error] Cannot parse OData response result.  Error: A node of
    type 'StartArray' was read from the JSON reader when trying to read a
    value of a property; however, a 'PrimitiveValue' or 'StartObject' node
    was expected.
    The only OData source that has worked with PowerBI is one in which we turned off all properties that were not Strings.  In other words, as soon as the source has property types like Arrays, Objects or Dates, we get errors with PowerBI.  
    But the data validates with odata.org validator, so I am at a complete loss to understand how to "fix" data which is not broken.
    Is there a guide available somewhere showing what "subset" of OData that PowerBI accepts?  And are there plans to update PowerBI in the future to accept valid OData?
    miles
    Sample Odata that PowerBI chokes on:
      "d": {
        "results": [
            "__metadata": {
              "type": "cnevids_staging.videos",
              "id": "http://slcnpde093:3013/cne/odata/videos('NTBmYjBkODYzNDEwZmMwZGQ4MjQ2ZDIy')",
              "uri": "http://slcnpde093:3013/cne/odata/videos('NTBmYjBkODYzNDEwZmMwZGQ4MjQ2ZDIy')"
            "Id": "NTBmYjBkODYzNDEwZmMwZGQ4MjQ2ZDIy",
            "article_url": "",
            "brand_id": "NTBmYWZlNTg5M2U5ZjNlODZhMDAwMDAx",
            "buy_call_to_action": "",
            "buy_url": "",
            "cloudinary_version": "1367966946",
            "cover_story": false,
            "description": "Glamour March 2013: The Guys From Nashville Play \"Nail Polish or Country Song?\"",
            "do_not_publish": false,
            "duration_in_ms": 137000,
            "encode_version": "",
            "episode_number": 12,
            "index_within_season": 11,
            "index_within_series": 11,
            "monetize": false,
            "music_attribution": "",
            "permaslug": "glamour-march-2013-the-guys-from-nashville-pl",
            "poster_image_version": "1362346875",
            "recency_rank": 0,
            "slug": "glamour-march-2013-the-guys-from-nashville-pl",
            "state": "active",
            "suppress_on_the_scene": false,
            "title": "Glamour March 2013: The Guys From Nashville Play \"Nail Polish or Country Song?\"",
            "trending_index": {
              "__metadata": {
                "type": "cnevids_staging.videos.trend"
              "daily": 0,
              "weekly": 0,
              "monthly": 0,
              "all_time": 0,
              "based_on_count_day": null,
              "yesterday_view_count": 0,
              "bias": 0
            "videographer_unknown": true

    Is this in the context of Q&A, or is this a PQ question?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Data Pump import to a sql file error :ORA-31655 no data or metadata objects

    Hello,
    I'm using Data Pump to export/import data, one requirement is to import data to a sql file. The OS is window.
    I made the follow export :
    expdp system/password directory=dpump_dir dumpfile=tablesdump.dmp content=DATA_ONLY tables=user.tablename
    and it works, I can see the file TABLESDUMP.DMP in the directory path.
    then when I tried to import it to a sql file:
    impdp system/password directory=dpump_dir dumpfile=tablesdump.dmp sqlfile=tables_export.sql
    the log show :
    ORA-31655 no data or metadata objects selected for job
    and the sql file is created empty in the directory path.
    I'm not DBA, I'm a Java developer , Can you help me?
    Thks

    Hi, I added the command line :
    expdp system/system directory=dpump_dir dumpfile=tablesdump.dmp content=DATA_ONLY schemas=ko1 tables=KO1QT01 logfile=capture.log
    the log in the console screen is (is in Spanish), no log file was cerated in the directory path.
    Export: Release 10.2.0.1.0 - Production on Martes, 26 Enero, 2010 12:59:14
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Conectado a: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    UDE-00010: se han solicitado varios modos de trabajo, schema y tables.
    (English error)
    UDE-00010: multiple job modes requested,schema y tables.
    This is why I used tables=user.tablename instead, is this right ?
    Thks

  • Error trying to extract data via HFM objects

    I've written a program to extract selected data from HFM (version 11.1.1.3.500) using the API objects. The program (shown at the bottom of this post) is failing on the 2nd of the following 2 lines:
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    oOption.CurrentValue = lBudgetScenario
    where oOption is a data load/extract object previously initialized and lBudgetScenario is the long internal ID for our budget scenario.
    The error is usually "COM Exception was unhandled" with a result code of "0x800456c7", but, mysteriously, even with no code changes, it sometimes throws the error "FileNotFoundException was not handled", where it says that it could not load "interop.HSXServerlib or one of its dependencies". The second error occurs even though HSXServer was previously initialized in the program and used in conjunction with the login.
    I've carefully traced through the VB.NET 2010 code and find that all relevant objects are instantiated and variables correctly assigned. It also occurred to me that the data load DLLs might have been updated when the 11.1.1.3.50 and 500 patches were applied. For that reason, I removed the references to those DLLs, deleted the interop files in the debug and release folders and copied the server versions of those DLLs to my PC. I then restored the DLL references in Visual Studio which recreated the interops. However, the error still occurs.
    The ID I'm using (changed to generic names in the code below) has appropriate security and, for example, can be used to manually extract data for the same POV via the HFM client.
    I've removed irrelevant lines from the code and substituted a phony ID, password, server name and application name. The line with the error is preceded by the comment "THE LINE BELOW IS THE ONE THAT FAILS".
    Imports HSVCDATALOADLib.HSV_DATAEXTRACT_OPTION
    Module Module1
    Public lActualScenario, lBudgetScenario As Long
    Public oClient As HSXCLIENTLib.HsxClient
    Public oDataLoad As HSVCDATALOADLib.HsvcDataLoad
    Public oOptions As HSVCDATALOADLib.IHsvLoadExtractOptions
    Public oOption As HSVCDATALOADLib.IHsvLoadExtractOption
    Public oSession As HSVSESSIONLib.HsvSession
    Public oServer As HSXSERVERLib.HsxServer
    Sub Main()
    'Create a client object instance, giving access to
    'the methods to logon and create an HFM session
    oClient = New HSXCLIENTLib.HsxClient
    'Create a server object instance, giving access to
    'all server-based methods and properties
    oServer = oClient.GetServerOnCluster("SERVERNAME")
    'Establish login credentials
    oClient.SetLogonInfoSSO("", "MYID", "", "MYPASSWORD")
    'Open the application, which will initialize the server
    'and session instances as well.
    oClient.OpenApplication("SERVERNAME", "Financial Management", "APPLICATION", oServer, oSession)
    'Instantiate a data load object instance, which will be used to extract data from
    'FRS.
    oDataLoad = New HSVCDATALOADLib.HsvcDataLoad
    oDataLoad.SetSession(oSession)
    'Initialize the data load options interface.
    oOptions = oDataLoad.ExtractOptions
    'Find the internal ID numbers for various scenarios and years.
    'These are required for HFM API function calls.
    lActualScenario = GetMemberID(DIMENSIONSCENARIO, "Actual")
    lBudgetScenario = GetMemberID(DIMENSIONSCENARIO, "Budget")
    'Construct file names for open data.
    strFileName = "c:\Temp\FEWND_BudgetData.dat"
    strLogFileName = "c:\Temp\FEWND_BudgetData.log"
    'Extract data for the current open cycle.
    ExtractData("Budget", BudgetYear, "Dec", strFileName, strLogFileName)
    End Sub
    Sub ExtractData(ByVal strScenario As String, ByVal strYear As String, ByVal strPeriod As String, _
    ByVal strFileName As String, ByVal strLogFileName As String)
    'Populate the Scenario element.
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    If strScenario = "Actual" Then
    oOption.CurrentValue = lActualScenario
    Else
    'THE LINE BELOW IS THE ONE THAT FAILS
    oOption.CurrentValue = lBudgetScenario
    End If
    End Sub
    Function GetMemberID(ByVal lDimID As Long, ByVal strMemLabel As String) As Long
    Dim oMetaData As HSVMETADATALib.HsvMetadata
    oMetaData = oSession.Metadata
    oEntityTreeInfo = oMetaData.Dimension(lDimID)
    GetMemberID = oEntityTreeInfo.GetItemID(strMemLabel)
    End Function
    End Module

    I stumbled upon the solution to my problem. The documentation for extracting data via objects defines member ID variables as Longs. In fact, I've always defined such variables as longs in previous object programs and had no problems. It appears that the datal load/extract "option" property of "Currentvalue" is defined as integer. When I changed all of my member ID items (such as the "lBudgetScenario" variable that was the right-side of the failing assignment statement) to be integers, the program worked.

  • Throwing error when loading_If no data found for the field

    Hi,
    How can we introduce an ‘error trap’ for the two characteristics COMPANYCODE and COSTCENTER. If it finds no data for these two chars, theload has to fail and produse error message for the records.
    Can anybody send me the code and how to implement the logic.
    Thanks in advance.

    Hi You can try this sample code..and correct the fields accordinly..
    In the Update rules : write the following code for each IO.
    For Company Code------
      IF COMM_STRUCTURE-COMPCODE IS INITIAL.
        ABORT = 1.
      ELSE.
        RESULT = COMM_STRUCTURE-COMPCODE .
      ENDIF.
    For Cost Centre------
    IF COMM_STRUCTURE-COSCTCNTR IS INITIAL.
        ABORT = 1.
      ELSE.
        RESULT = COMM_STRUCTURE-COSCTCNTR.
      ENDIF.
    Also check the Abort - pre defined values in order to handle the errors effectively.
    Hope it helps.
    Message was edited by:
            Nasiroddin Pattan

  • Crystal Report error trying to retrieve data from a user table

    Hi,
    I'm making crystal report application with VS 2005 and I need to retrieve data form a user table. I'm using Pull method, I configure the connection and parameters by code.
    I think that the problem could be the @ that is used to identify these tables. Please, if some body had this problem before and have a solution, please let me know asap.
    Thanks

    Hi Andrea,
    I had the same problem today. I upgraded from Crystal Version 8 to 11 and the problem was solved. Maybe it is too late for you, but I wanted to post the solution if anybody else has the same problem.
    Regards
    Guillermo

  • Error trying to get LiveCycle ES up and running with JBoss/SQL Server

    I am having an error trying to get LiveCycle ES Trial up and running with JBOSS and SQL Server.  The LiveCycle ES and JBOSS engines are running on Windows Server 2003 SP #2 under VMWare Server with 2 vCPUs/1 GB vRAM.  The SQL Server database is SQL 2005 x86-64 with SP #2 on a separate server.<br /><br />I have carefully followed all of the instructions for setting up jboss, modifying all of the appropriate XML files, downloading the SQL JDBC drivers and putting it in the %JBOSS_HOME%\server\all\lib directory, etc.  I tried both the SQL JDBC 1.1 and 1.2 drivers and they both fail.<br /><br />The error I get is on startup of jboss using<br />cmd /c start /low run.bat -c all<br />(and yes I also just tried run.bat -c all)<br /><br />it runs along file until it gets here<br />2008-06-18 16:00:03,123 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=IDP_DS' to JNDI name 'java:IDP_DS'<br />2008-06-18 16:00:03,123 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=EDC_DS' to JNDI name 'java:EDC_DS'<br />2008-06-18 16:00:03,373 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'<br />2008-06-18 16:00:03,373 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=adobe_JmsQueueXA' to JNDI name 'java:adobe_JmsQueueXA'<br />2008-06-18 16:00:03,389 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=adobe_JmsTopicXA' to JNDI name 'java:adobe_JmsTopicXA'<br />2008-06-18 16:00:03,482 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'<br />2008-06-18 16:00:03,514 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null<br />org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.jdbc.sqlserver.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.jdbc.sqlserver.SQLServerDriver))<br />     at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnecti on(LocalManagedConnectionFactory.java:164)<br />[ lots more error scrolls ]<br /><br />this repeats multiple times<br /><br />I can see that it does acknowledge that I put the sqljdbc.jar file in the appropriate directory from the boot.log<br /><br /><snip><br />15:59:44,856 DEBUG [SARDeployer] deployed classes for file:/C:/jboss/server/all/lib/sqljdbc.jar<br /><snip><br /><br />please help!

    APJ<br />We ran into many issues setting up a very similar environment.  In the end we had to use a specially configured JBoss, supplied by Adobe, to make a connection with the SQL database.  Since you have SQL w/ SP2 on it, you will need the 1.2 driver for sure, but you may want to talk to Adobe support about obtaining the version of JBoss they supplied us with.  The Adobe Support Reference Number is: 1-52422366.<br /><br />Even with the alternate JBoss we had to perform the following steps to get the configuration right:<br /><br />1.     Install Livecycle from the installation DVD.  Follow the instructions for installing LiveCycle supplied by Adobe, including all pre-installation instructions.  Make sure NT service is installed with parameters, and dont run Configuration Manager.<br />2.     Rename %LIVECYCLE_INSTALL%\jboss to %LIVECYCLE_INSTALL%\jboss_orig<br />3.     Extract the zipped new, good instance of JBoss (supplied by Adobe)  to the %LIVECYCLE_INSTALL%\ folder  <br />4.     Go to the %LiveCycle_Home%\deploy folder and make a copy of the file adobeimport_SQLServer.jar file.  Rename the copy of the file to aadobeimport_SQLServer.jar.  There seems to be a bug in configuration manager that looks for a file with the extra  a appended to the beginning of the file name, where that file normally isnt there.  Make sure that the adobeimport_SQLServer.jar file is still in this folder as well.<br />5.     Edit the data source file (%JBOSS_HOME%\server\all\deploy\ adobe-ds.xml) to point to the correct database for the LiveCycle Server.<br />a.     Update the <connection-url>, <user-name>, and <password> tags with the correct database connection information.<br />b.     If BAM is to be used on the server (this should be done on the Production server) then delete both lines that state Remove this line, if BAM is used.<br />6.     Go to the login configuration file (%JBOSS_HOME%\server\all\conf\login-config.xml), and edit the section labeled <application-policy name = "MSSQLDbRealm">.<br />a.     Change the Principal, UserName, and Password options to point to the correct database.  These will be the same as what was changed in the adobe-ds.xml file from the step above.<br /><br />7.     Edit the system variables on the server.  Add to the Path variable %JBOSS_HOME%\bin, and add the variable JBOSS_HOME with the path to the JBoss folder on the server. (D:\Adobe\LiveCycle8\jboss  for example)<br />8.     From windows services start the JBoss for Adobe LiveCycle ES v8.0 service.  Review the JBoss server log (%JBOSS_HOME%\server\all\log\server.log) to verify that JBoss starts without throwing any exception errors (A document timeout exception is the only acceptable exception for starting the service).  <br />9.     Run the LiveCycle Configuration Manager (%LiveCycle_Home%\ConfigurationManager\bin\ConfigurationManager.bat).  <br />a.     Select to Not Upgrade fromLiveCycle 7.x.<br />b.     Check all boxes on the Solution Component Selection screen.<br />c.     For the Task Selection screen check all the boxes except for the Import LiveCycle ES Samples into LiveCycle ES if on the production server. <br />d.     Run through the rest of the configuration manager interface to setup the LiveCycle server with the new application server.  Follow the steps supplied by Adobe for this.<br />10.     Once configuration manager has completed, reboot the server, and verify that JBoss starts up again without any exceptions or errors (again a document timeout exception is an acceptable exception.  Look at the server log to verify this (%JBOSS_HOME%\server\all\log\server.log)).

  • Trying to query data from a view - ORA-01882 and ORA-02063 Errors

    Hey there,
    I tried to query data from a view that was provided by a colleague. This view works fine and gives correct data using PL/SQL Developer or SQLPLUS, but in SQL Developer, I get the following error:
    ORA-01882: Time zone region not found
    ORA-02063: preceding line from SYSTOOLS
    01882.00000 - "timezone region %s not found"
    * Cause: Specified reason name was not found
    * Action: Please contact Oracle Customer Support
    Vendor Code 1882
    Where comes this error message from?! SYSTOOLS is the database link.
    Can't see an obvious reason for this error.
    OS is Windows 2000 SP4, SQL Developer is v1.1.1.25 BUILD MAIN-25.14
    Regards,
    Thomas

    From Oracle Messages 'Cause and Action'
    http://www.oracle.com/technology/products/designer/supporting_doc/des9i_90210/cmnhlp72/messages/ora_messages.htm
    ORA-01882, 00000, "timezone region %s not found"
    Cause: The specified region name was not found.
    Action: Please contact Oracle Customer Support.
    Maybe invalid region in NLS_LANG?
    "select * from v$nls_parameters"
    Starting this script in all developer program and compared result...

  • Database.LoadDataSet() method throwing error while retriving data from IBM DB2 database

    Database.LoadDataSet() method is throwing error during retriving data from empty table of IBM DB2 database. It is giving error code "SQL0100W".
    “Error Message: 0NO_DATA [02000] [IBM] [DB2 / NT] SQL0100W FETCH, whether there is a line to be UPDATE or DELETE, or of the query result is an empty table .
    SQLSTATE = 02000”

    Hello SharayuPandit,
    For issues regarding DB2, i suggest that you could post it to DB2 related forum:
    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000842
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for