Weird Pl/SQL Expression Default error

I have a date field on one page that has a pl/sql expression default of:
IF to_number(to_char(trunc(sysdate,'dd')) < 2 THEN
to_char(trunc(sysdate,'mm'),'MM/DD/YYYY')
ELSE
to_char(add_months(trunc(sysdate,'mm'),-1),'MM/DD/YYYY')
END IF;
This works perfectly.
However, on a different page, I have another date field with the same code for the default, and it is set to pl/sql expression, but when I run that page, I get the following error:
ORA-06550: line 1, column 27: PLS-00103: Encountered the symbol "IF" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe ERR-9132 Error in PLSQL expression for item default code, item=P79_BEGIN_DATE
I have deleted and recreated the field. Changed it to static text, run the page, changed it back to pl/sql expression... Still no luck..
Any ideas?
Thanks,
JohnA

Don't know if it is just a copy and paste error, but beside the closing bracket I am missing two semicolons in this code:</br>
</br>
IF to_number(to_char(trunc(sysdate,'dd'))<b>)</b> < 2 THEN</br>
to_char(trunc(sysdate,'mm'),'MM/DD/YYYY')<b>; <- one here</b></br>
ELSE</br>
to_char(add_months(trunc(sysdate,'mm'),-1),'MM/DD/YYYY')<b>; <- one here</b></br>
END IF;</br></br>
Maybe this helps you out?</br>
</br>
Regards, Tine.

Similar Messages

  • Uninstall SQL EXPRESS 2014 ERROR

    Hi, i managed to install SQL Express 2014 on Windows 7 Pro SP1 without any problems at all. When i try to uninstall it i get the error message.
    "The operating system on this computer or its service pack level does not meet the minimum requirements for SQL Server 2014."
    However it installed absolutely fine without issue, why does it not uninstall? Surely uninstalling should have a lower requirement than installing it!
    What is the fix or is this yet another MS bug?

    Hello,
    Please try to open Command Prompt, go to the folder where setup.exe (SQL Server setup) is located and try to run the following command:
    Setup.exe /Action=Uninstall
    Another option is to use the Program Compatibility Assistant on setup.exe.
    http://www.howtogeek.com/howto/10436/using-program-compatibility-mode-in-windows-7/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SQL Expression in Filter conditon Error in OBIEE 10g

    Hi
    I am getting an error while giving the sql in the sql expression in filter conditon.
    The sql expression I am giving is:SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"'
    Error:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('set variable disable_cache_hit=1; SELECT "Task"."Task Name" saw_0, "Task Runs"."Time in Seconds" saw_1, TOPN("Task Runs"."Time in Seconds", 10) saw_2, "Task Runs"."Start Time" saw_3 FROM "Analysis" WHERE "Task Runs"."Start Time" >= SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"')}
    But when I individualy select start time column and check max of it the data comes fine, but if I am giving in sql expression it errors out.
    Please suggest.

    Hi Sini,
    I have tried taking the second suggestion but I get no result for that
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    Here I did not understand the code Task Runs"."Start Time" by "Task"."Task Name". If possible elaborate.
    And 1st suggestion the query formed just looks the query u suggested.
    Unable to figure out what exactly is the problem.
    Try something as in with 2 queries
    http://www.cool-bi.com/Tweaks/JoinsinAnswers.php
    or else
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    not sure how it works but this is other way of your sql in BI

  • Error using presentation variable in SQL Expression

    Hi all,
    I'm receiving an error - '...Error getting drill information...' due to a presentation variable being used in a SQL Expression. It probably has something to do with a data type issue. I've narrowed the error to the use of the presentation variable.
    I'm setting a presentation variable, pres_mth_nme_to, from a dashboard prompt. The prompt contains a month name.
    I'm using the presentation variable as part of a SQL Expression in a filter. The gist of the SQL Expression is to use the
    presentation variable in a CASE and set a value accordingly. For example:
    Column: Month Sort Value
    Operator: Between
    Value: *10*
    SQL Expression: *Case  @{pres_mth_nme_to}{some default} WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END*
    The month name is character. If I were to hard code this, I don't recieve the error. For example:
    CASE 'SEP' WHEN 'NOV' THEN '10' WHEN 'DEC' ...END
    There something going on with the data type from the prompt and it being used in the comparison. If I use a CAST, the problem still exists.
    CASE CAST(@{pres_mth_nme_to} as char(3)) WHEN 'NOV' THEN ... END
    If I'm in Answers, the problem doesn't exist, I'm assuming because of the default values. If I'm on the dashboard, it does exist, I'm assuming because of recieving the prompt value.
    I don't know what I'm missing. Any suggestions?
    Thanks.

    DJ,
    if the formula presented by you is exactly true, i mean it was not fabricated to present as an example in the forum, you should include the presentation variable in single quotes.
    i.e. your formula must look somthing like
    Case '@{pres_mth_nme_to}{some default}' WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END
    let me know if it did solve the issue...
    -bifacts
    http://www.obinotes.com
    Edited by: bifacts on Oct 25, 2010 1:50 PM

  • Error in filter with SQL Expression

    HI Experts,
    I have a sql query which works fine, but have to_date funtion() in the where clause as below :
    and oe.ORDERED_DATE BETWEEN to_date('09-APR-2009 23:59:59','DD-MON-YYYY HH24:MI:SS')
    AND to_date('10-APR-2009 23:59:59','DD-MON-YYYY HH24:MI:SS')
    and (ol.ORDERED_ITEM LIKE 'abckdo%' OR ol.ORDERED_ITEM LIKE 'xysalnb%')
    I am trying to create an OBIEE report with filter where the values of the filter are select as SQL Expression. and gave value to first variable as "to_date('09-APR-2009 23:59:59','DD-MON-YYYY HH24:MI:SS')" and the second variable as " to_date('10-APR-2009 23:59:59','DD-MON-YYYY HH24:MI:SS')"
    But the report is giving me an error. If I remove the date condition, then the report works fine. Can anyone give some inputs in resolving the problem. The mentioning of the HH24:MI:SS is very import to get the right resultset.
    Thanks in Advance.
    svr

    Hi SVR,
    I've had similar difficulties in the past with OBIEE and using the TO_DATE in the logical SQL expressions. I'm not sure if OBIEE recognizes TO_DATE or if it only recognizes TO_DATE is certain situations.
    However, I believe OBIEE recognizes the CAST( AS DATE) in all situations. Here's what I would recommend doing.
    1) Go into the connection pool associated with the report your creating and click on the second tab, "Connection Scripts"
    2) In the "Execute on Connect" area, click the "New" button and paste the following code: alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS' ** this step changes the default DD-MON-YYYY format of Oracle, to the format you will be giving the data in.
    3) Save the RPD and bounce the services if you made this change off-line.
    4) Instead of using TO_DATE() on your formulas, use CAST('09-APR-2009 23:59:59' AS DATE). Since we changed the default DATE mask to be the format that you're passing in, you should no longer see any issues.
    Hope that helps!
    -Joe

  • Pl/sql expression for default value

    I'm trying to run this simple script as a default value using pl/sql expression, but I keep getting this error. THe select statement itself works fine as a sql statement source value, but will not work as a pl/sql exression as a default value. This (:P33_SYSUSERID_CREATED_BY ) is the field name on the form. Any ideas?
    begin
    select a.id || ', ' || A.NAME_LAST into :P33_SYSUSERID_CREATED_BY from S_USERSV a where a.name_last = 'HAMMAKER';
    end;
    Error ERR-9132 Error in PLSQL expression for item default code, item=P33_SYSUSERID_CREATED_BY
    OK
    ORA-06550: line 1, column 27: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe

    Sudha,
    For a default value type of PL/SQL Expression, you could create a function that accepts an input and returns a value. If the function (not a procedure) is named GET_REFNO, you would call it using an expression in the default value field like:
    get_refno(:P3_REFTYPE)
    For a default value type of PL/SQL Function Body, you could call your existing procedure with a default value like:declare
        l_value varchar2(32767);
    begin
        get_refno(:P3_REFTYPE, l_value);
        return l_value;
    end;Scott

  • SQL Expressions in RAD -Getting error during runtime while generating rpt

    Hi
    We have just migrated from WSAD to RAD Version: 7.0.0.7. 
    The issue is: I am getting the error at the runtime when I am trying to use the SQL expression in my one of the report. The SQL Expression feature is not supported by this version of RAD. I checked the Help contents. It says
    Field Objects: SQL expression fields
    This report contains SQL Expression fields. These fields are not visible in this version of the Crystal Reports designer, but they will be evaluated by the system when the report is executed. New SQL Expression fields cannot be created by the designer. SQL Expression fields will remain in the .rpt file after saving and can be edited by other Crystal Reports designers
    To me it seems you can use the 'SQL Expressions' in the report using some Crystal Reports designers and at the runtime it will be evaluated. So I edited my report with some Crystal Reports Designer and tested it on WSAD. It worked fine. Now since we have migrated to RAD, this is an issue since I am getting the following error:
    ERROR [WebContainer : 0] com.crystaldecisions.reports.formatter.formatter.objectformatter - com.crystaldecisions.reports.dataengine.be: Failed to parse expression.
    [12/17/08 15:12:14:750 EST] 0000001c SystemOut     O 15:12:14,671 ERROR [WebContainer : 0] com.businessobjects.reports.sdk.JRCCommunicationAdapter - Failed to export report
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: Failed to parse expression.
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    When I remove the expression fields, it works fine on RAD too.
    I am using following versions:
    RAD Version: 7.0.0.7
    Crystal Reports for Rational Application Developer Version: 11.5.6.v20080304.
    Crystal Report Runtime Support version is 11.8.4.v1094
    Please let me know if somebody has faced the similar issue.
    Any help/suggestions would be appreciated.
    Thanks,
    Kamal

    Hi
    We have just migrated from WSAD to RAD Version: 7.0.0.7. 
    The issue is: I am getting the error at the runtime when I am trying to use the SQL expression in my one of the report. The SQL Expression feature is not supported by this version of RAD. I checked the Help contents. It says
    Field Objects: SQL expression fields
    This report contains SQL Expression fields. These fields are not visible in this version of the Crystal Reports designer, but they will be evaluated by the system when the report is executed. New SQL Expression fields cannot be created by the designer. SQL Expression fields will remain in the .rpt file after saving and can be edited by other Crystal Reports designers
    To me it seems you can use the 'SQL Expressions' in the report using some Crystal Reports designers and at the runtime it will be evaluated. So I edited my report with some Crystal Reports Designer and tested it on WSAD. It worked fine. Now since we have migrated to RAD, this is an issue since I am getting the following error:
    ERROR [WebContainer : 0] com.crystaldecisions.reports.formatter.formatter.objectformatter - com.crystaldecisions.reports.dataengine.be: Failed to parse expression.
    [12/17/08 15:12:14:750 EST] 0000001c SystemOut     O 15:12:14,671 ERROR [WebContainer : 0] com.businessobjects.reports.sdk.JRCCommunicationAdapter - Failed to export report
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: Failed to parse expression.
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    When I remove the expression fields, it works fine on RAD too.
    I am using following versions:
    RAD Version: 7.0.0.7
    Crystal Reports for Rational Application Developer Version: 11.5.6.v20080304.
    Crystal Report Runtime Support version is 11.8.4.v1094
    Please let me know if somebody has faced the similar issue.
    Any help/suggestions would be appreciated.
    Thanks,
    Kamal

  • SQL Express 2008 R2 Error:15209 - An error occurred during encryption

    I am trying to install SQL Server Express 2008 R2 but it keeps failing .
    The computer is Windows 7 x64, all the latest service packs and updates installed. 
    The application is by Greatland, called Yearli (formerly called WinFiler). 
    Last year’s WinFiler, which was installed on this PC, used SQL 2008 Express (x86). 
    This year’s version is using R2 and attempted to install a new database. 
    I have since uninstalled last year’s database.
    When I run the Yearli install, it first attempts to install SQL Express 2008 R2, but the install fails with this error at the end of ERRORLOG:
    Error: 15209, Severity: 16, State: 1. "An error occurred during encryption."
    I have been researching this for days.  What I have done so far, based on MSKB and other user posts, is the following:
    Changed the account for the SQL service from Local System to NETWORK SERVICE. 
    Add NETWORK SERVICE to the “Protect” folder with Full permission added.
    Neither of these have worked.  SQL appears to be installed, but the service will not start.
    In the Windows System log I get this message:
    The SQL Server (WFP_SS8E) service terminated with service-specific error The specified resource name cannot be found in the image file..
    In the Windows Application log I get this message:
    FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql10_main_t.obj.x86fre\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'. Diagnose and correct the operating system error,
    and retry the operation.
    The App log error is interesting because there is no E: drive on the system.
    SFC /Scannow came up clean.
    I don’t have any other ideas, so if anyone else does, I’d appreciate it.

    SQL appears to be installed, but the service will not start.
    In the Windows System log I get this message:
    The SQL Server (WFP_SS8E) service terminated with service-specific error The specified resource name cannot be found in the image file..
    In the Windows Application log I get this message:
    FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql10_main_t.obj.x86fre\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'. Diagnose and correct the operating system error,
    and retry the operation.
    Hi dfosbenner,
    According to your description, SQL Server fails to start and you get the error message (Operating system error 2……) in Windows Application log. To work around this issue, you might have to change the path of the files by running the following scripts from
    the command prompt. The example is to put MSDB files in C drive, you can change the path of the files to other drives.
    NET START MSSQL$SQLEXPRESS /f /T3608
    SQLCMD -S .\SQLEXPRESS
    ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBData, FILENAME = 'C:\MSDBData.mdf');
    ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBLog, FILENAME = 'C:\MSDBLog.ldf');
    go
    exit;
    NET STOP MSSQL$SQLEXPRESS
    For more details, please review the following thread.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/54bbcac3-41c5-4a5d-a4f6-2669e538dc82/sqlserver-2008-express-install-error?forum=sqlexpress
    Thanks,
    Lydia Zhang

  • MS SQL Express 2008 Installation Failure (Facility Code/Error Code : 1203/-2068643839)

    I am performing silent installation for a named instance of  SQL Server 2008 Express edition on a Windows 7 machine. The installation fails with Exit Facility Code
    1203 and Error Code -2068643839.
    PFB the details:
    Operating System : Windows 7  Professional edition Service Pack 1
    System Type : 64-Bit Operating System
    SQL Express Installer : SQL Server 2008 Express Installer 32-bit (compatible with 64-bit OS)
    I browsed through the MSDN and other forums. The root cause of this issue has been stated as the Windows user is not an administrator or windows user does not have the rights to modify the Microsoft SQL Server folder inside the Program Files folder. I have
    checked for this common issues and the windows user is an administrator and has the sufficient rights to modify the
    C:\Program Files(x86)\Microsoft SQL Server folder.
    Appreciate if anyone can provide pointers to resolve this issue.
    PFB the contents of Summary.txt file:
    Overall summary:
      Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
    rerun SQL Server Setup.
      Exit code (Decimal):           -2068643839
      Exit facility code:            1203
      Exit error code:               1
      Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
    rerun SQL Server Setup.
      Start time:                    2014-01-28 15:59:43
      End time:                      2014-01-28 16:01:03
      Requested action:              Install
      Log with failure:              C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140128_155901\sql_engine_core_inst_Cpu32_1.log
      Exception help link:           http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1600.22
    Machine Properties:
      Machine name:                  ********
      Machine processor count:       4
      OS version:                    Windows Vista
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
    Package properties:
      Description:                   SQL Server Database Services 2008
      SQLProductFamilyCode:          {628F8F38-600E-493D-9946-F4178F20A8A9}
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       0
      Installation location:         C:\Program Files (x86)\DHL\EasyShip v5.3\SQL Express\Express\x86\setup\
      Installation edition:          EXPRESS
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      False
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASDOMAINGROUP:                 <empty>
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Automatic
      CONFIGURATIONFILE:             C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140128_155901\ConfigurationFile.ini
      ENABLERANU:                    True
      ERRORREPORTING:                False
      FEATURES:                      SQLENGINE
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  NT AUTHORITY\LOCAL SERVICE
      FTSVCPASSWORD:                 *****
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTALLSHAREDDIR:              C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files (x86)\Microsoft SQL Server\
      INSTANCEID:                    DHLEASYSHIP
      INSTANCENAME:                  DHLEASYSHIP
      ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
      ISSVCPASSWORD:                 *****
      ISSVCSTARTUPTYPE:              Automatic
      MEDIASOURCE:                   C:\Program Files (x86)\DHL\EasyShip v5.3\SQL Express\Express\
      NPENABLED:                     1
      PID:                           *****
      QUIET:                         True
      QUIETSIMPLE:                   False
      RSINSTALLMODE:                 FilesOnlyMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 *****
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT AUTHORITY\SYSTEM
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           NT AUTHORITY\SYSTEM
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  False
      TCPENABLED:                    1
      X86:                           False
      Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140128_155901\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      MSI status:                    Failed: see details below
      MSI error code:                0xB8A6B4FA
      MSI log file location:         C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140128_155901\sql_engine_core_inst_Cpu32_1.log
      MSI error description:         
      Configuration status:          Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140128_155901\SystemConfigurationCheck_Report.htm

    PFB the details from sql_engine_core_inst_Cpu32_1.log file:
    === Verbose logging started: 1/28/2014  16:00:53  Build type: SHIP UNICODE 5.00.7601.00  Calling process: C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Release\x86\setup100.exe ===
    MSI (c) (D8:20) [16:00:53:535]: Resetting cached policy values
    MSI (c) (D8:20) [16:00:53:535]: Machine policy value 'Debug' is 0
    MSI (c) (D8:20) [16:00:53:535]: ******* RunEngine:
               ******* Product: C:\Program Files (x86)\DHL\EasyShip v5.3\SQL Express\Express\x86\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
               ******* Action:
               ******* CommandLine: **********
    MSI (c) (D8:20) [16:00:53:535]: Client-side and UI is none or basic: Running entire install on the server.
    MSI (c) (D8:20) [16:00:53:535]: Grabbed execution mutex.
    MSI (c) (D8:20) [16:00:53:536]: Cloaking enabled.
    MSI (c) (D8:20) [16:00:53:536]: Attempting to enable all disabled privileges before calling Install on Server
    MSI (c) (D8:20) [16:00:53:536]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (08:30) [16:00:53:538]: Running installation inside multi-package transaction C:\Program Files (x86)\DHL\EasyShip v5.3\SQL Express\Express\x86\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
    MSI (s) (08:30) [16:00:53:538]: Grabbed execution mutex.
    MSI (s) (08:94) [16:00:53:539]: Resetting cached policy values
    MSI (s) (08:94) [16:00:53:539]: Machine policy value 'Debug' is 0
    MSI (s) (08:94) [16:00:53:539]: ******* RunEngine:
               ******* Product: C:\Program Files (x86)\DHL\EasyShip v5.3\SQL Express\Express\x86\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
               ******* Action:
               ******* CommandLine: **********
    MSI (s) (08:94) [16:00:53:539]: Machine policy value 'TransformsSecure' is 0
    MSI (s) (08:94) [16:00:53:539]: User policy value 'TransformsAtSource' is 0
    MSI (s) (08:94) [16:00:53:539]: Machine policy value 'DisableUserInstalls' is 0
    MSI (s) (08:94) [16:00:53:539]: Specified instance {B5153233-9AEE-4CD4-9D2C-4FAAC870DBE2} via transform :InstID01.mst;:InstName01.mst is already installed. MSINEWINSTANCE requires a new instance that is not installed.
    MSI (s) (08:94) [16:00:53:539]: MainEngineThread is returning 1639
    MSI (s) (08:30) [16:00:53:540]: User policy value 'DisableRollback' is 0
    MSI (s) (08:30) [16:00:53:540]: Machine policy value 'DisableRollback' is 0
    MSI (s) (08:30) [16:00:53:540]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (08:30) [16:00:53:540]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
    MSI (s) (08:30) [16:00:53:540]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
    MSI (s) (08:30) [16:00:53:540]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
    MSI (s) (08:30) [16:00:53:540]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
    MSI (s) (08:30) [16:00:53:540]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (s) (08:30) [16:00:53:540]: Restoring environment variables
    MSI (c) (D8:20) [16:00:53:541]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (c) (D8:20) [16:00:53:541]: MainEngineThread is returning 1639
    === Verbose logging stopped: 1/28/2014  16:00:53 ===

  • Error in compiling SQL Expression

    In the [Error in SQL Expression; thread, Kurt Reinhardt wrote "Please note, a SQL Expression can only return a single, distinct value per each record in the main recordset.", I tried this where my main Record Selection's SQL query is:
    {GLF_LDG_ACC_TRANS.ldg_name} = {@&CH_LDG_GL_ACT_CURR} and
    {GLF_LDG_ACC_TRANS.period} = {@&CH_PERIOD_GL_CURR} and
    {GLF_LDG_ACC_TRANS.ACCNBRI}  "99991103" and
    {GLF_LDG_ACC_TRANS.DOC_REF1}  "{%SundryCreditors}" and
    {GLF_LDG_ACC_TRANS.DOC_TYPE} = "$APINVCE"
    My SQL Expression %SundryCreditors is:
    select doc_ref1
    from glf_ldg_acc_trans
    where ldg_name = 'APLED09'
      and period = "GLF_LDG_ACC_TRANS"."PERIOD"
      and doc_ref1 = "GLF_LDG_ACC_TRANS"."DOC_REF1"
      and accnbri like 'SUNDRY%'
    which essentially queries the same table as the main recordset using the same key fields, and returns one row only. However, when I click on the Check button in the Formula Workshop window, I get the error message "Error in compiling SQL Expression : Database Connection Error: '42000:MicrosoftODBC SQL Server DriverSQL ServerIncorrect syntax near the keyword 'select'. Database Vendor Code: 156 '".
    Do you know what is my issue?

    If you know what you're doing, you can add a full select statement into a SQL Expression... And Kurt is correct when he says that it may only return a single row of info. Don is also correct when he says that this not what SQL commands are designed for.
    Here's what's happening...
    When you link your tables in the Database Expert and drop fields onto the design surface (and optionally, add criteria to the Select Expert), CR builds out a SQL statement that can is to be sent out to the db server so that the data can be returned. You can view this SQL by going to Database > Show SQL Query...
    When you add a SQL Expression, CR inserts it into the SQL Query as another data column. This is typically done to take advantage of functions that are available in the data base but not in CR.
    A few crafty individuals, like Kurt, have figured out that you can in fact inset a full SELECT query into a SQL Expression and it will be inserted into the CR generated querie's SELECT list as a sub-query.
    Bear in mind 2 things... #1) You have to be familiar with SQL syntax, namely you have to know the proper syntax for using sub-queries in a SELECT list in your data base. #2) CR doesn't officially support is behavior and they won't offer you any help if the current functionality is removed in later versions.
    HTH,
    Jason

  • Error using Filter with SQL Expression

    Hey all -
    New to Oracle BI, and getting a problem with Filters that use SQL Expressions.
    The column I'm filtering on is a 4 digit year, expressed as a VARCHAR2(4 byte) in the physical database. My SQL Expression in the filter is:
    Column: CAL YEAR 4 DIGIT
    Operator: Is equal to/in
    SQL Expression: TO_CHAR(ADD_MONTHS(SYSDATE, -24), 'YYYY'))
    when I click on the "Results" Tab I get the following error message:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    I've isolated the issue to the expression above. If I put in a literal value and supply a four digit year like below it works:
    Column: CAL YEAR 4 DIGIT
    Operator: Is equal to/in
    SQL Expression: *2008*
    Any ideas on what's causing my problem?
    Thanks!
    Mac

    macearl wrote:
    SQL View does not display unless data is returned by the query. Is that normal?
    Also, none of these options shows the literal result of the expression we built, i.e.:
    expression: CAST(YEAR(TIMESTAMPADD(SQL_TSI_MONTH, -24, CURRENT_DATE)) as CHAR)
    result: *2008*
    Having the ability to test expressions and see their results would be very helpful in debugging. If anyone knows how to do that please share!
    Thanks!
    MacOk, Probably shoud have figured this out before, but in response to my own question, the way to view the result of an expression is to add the expression as a column and include it in the Table Presentation.
    - Mac (he can be taught)

  • Error in SQL Expression

    Hello All,
    I am having crystal reports XI and I am using OLE DB ADO connection for oracle driver to the DB.
    I took a correct SQL expression from a previous report which is working fine and then paste it in a new created SQL Expression in the new report. The exact tables are there. But when clicking on the tick button to check of there are some errors, a message is shown that : ORA-00942 table or view does not exist.
    Here is the SQl Expression:
    (select  MAX(intrates.RATE_DT)
    FROM INTRATES,SECTYPE,DEALS,SECISSUE
    WHERE sectype.thekey = "posnrpt"."SECTYPE"
    AND SECISSUE.THEKEY = SECTYPE.SECISSUE_ID
    AND LTRIM(RTRIM(UPPER(intrates.ISSUER_DETAIL_ID))) =LTRIM(RTRIM(UPPER('ID'||secissue.ISIN)))
    AND INTRATES.RATE_DT <= "posnrpt"."POSN_DT"
    I am wondering why it is working in a previous report which is created long time ago and now it is not working?
    Is it from the driver or I have to do further modifications!!!
    I am looking forward for your help.

    Good question, Jason.  The only officially supported use would be of the functions and operators explicitly listed within the editor.  The SAP Note referenced in my presentation gives a little more information:
    [1217871 - What is the intended use of 'SQL Expression' fields?|http://www.google.com/url?sa=t&source=web&cd=1&sqi=2&ved=0CBIQFjAA&url=http%3A%2F%2Fwww.sdn.sap.com%2Firj%2Fscn%2Fgo%2Fportal%2Fprtroot%2Fdocs%2Foss_notes_boj%2Fsdn_oss_boj_erq%2Fsap(bD1lbiZjPTAwMQ%3D%3D)%2Fbc%2Fbsp%2Fspn%2Fscn_bosap%2Fnotes%257B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333833373331%257D.do&ei=FtWHTMrpCoTQ8wTutsHfDg&usg=AFQjCNFZG-Ta5JiZFAzXf2HC5GE7-QkJug]
    I'm sure the reason the SELECT statements aren't officially supported is that they aren't written in Crystal syntax.  What one is able to do with a SELECT statement depends on the database (Access, Oracle, MS SQL Server, etc..), type of database connection (Native, ODBC, etc..) the flavor of SQL being used, which is dependent on the previous two, etc.. Even the functions and operators available in the editor depend on the above conditions. What you see as available may not be what I see..
    So, while SAP can support the feature as a whole, they can't necessarily provide syntax support, nor guarantee effectiveness.  There's also very little documentation on them, as a result. A lot of what I've learned to do with SQL Expressions has been through trial and error.
    Personally, I prefer to build reports against Views, if possible, and Commands or Stored Procedures, if necessary. SQL Expressions are great, though, in a pinch against existing reports with performance or design issues.  In the case of the report above, I was able to dramatically increase performance and eliminate sub-reports  in an existing report that was written by another individual.  Without the SQL Expressions, I would have had to write even more complicated SQL and rebuild the report.
    Since I can use them and I know how powerful they can be, I'll keep using them until I can't. At this point in time, they work with Crystal Reports 2008, which has a very low adoption rate, and I haven't heard of them being deprecated in Crystal Reports 2011, which I expect to be around for several years, so I'm not too concerned.
    ~Kurt

  • [SQL Question] ORA-00936: missing expression --- Possible Error on subquery

    I have one query that is basically three subqueries together.
    If I separate them, they run correctly, but once I put them together I get the Oracle error:
    ORA-00936: missing expression
    select associate_id, application_id, entity_id, profile_id, language, neutrals,
    created_date, sf_completed_date, completed_time, parent_respondent, parent_aid, attempt, parent_attempt,
    reported_top1, reported_top2, reported_top3, reported_top4, reported_top5, top1, top2, top3, top4, top5
         from profiles p1
              where sf_completed_date < to_date('15-aug-2006 00:00:00','DD-MM-YYYY HH24:MI:SS')
              and parent_respondent is null
              and parent_aid is null
              and neutrals < 155
              and p1.attempt in
    (select nvl(max(attempt),0)
         from profiles p2
              where p2.associate_id = p1.associate_id
              and p1.associate_id in)
    (select p1.associate_id, count(*) as count
         from
    (select top1 as theme
         from p1.profiles
         union all
    select top2 as theme
         from p1.profiles
         union all
    select top3 as theme
         from p1.profiles
         union all
    select top4 as theme
         from p1.profiles
         union all
    select top5 as theme
         from p1.profiles)
         group by theme);
    I'm using Golden, and this is the SQL where the error is happening:
    and p1.associate_id in)
    (select p1.associate_id, count(*) as countWhat is the best way to get this to run? Is it something with the way the subquery is written?
    thanks

    Try this:
    and   p1.attempt in (select nvl(max(attempt),0)
                         from   profiles p2
                         where  p2.associate_id = p1.associate_id
                         and p1.associate_id in
                           (select p1.associate_id
                                 , count(*) as count
                            from (select top1 as theme
                                  from   p1.profiles
                                  union  all
                                  select top2 as theme
                                  from   p1.profiles
                                  union  all
                                  select top3 as theme
                                  from   p1.profiles
                                  union  all
                                  select top4 as theme
                                  from   p1.profiles
                                  union  all
                                  select top5 as theme
                                  from   p1.profiles
                            group by theme
    ;

  • Syntax Error when using SQL Expression

    Morning all,
    When I try to type any SQL Expression within Crystal I am getting syntax errors, even when I type only SELECT {field name} FROM {table name}.
    Here is the query I did which gave me the following error:
    Query
    SELECT  order_progress . date_created
    FROM order_progress
    WHERE  order_progress . order_no = order_header . order_no
    AND  order_progress . order_status =77
    ORDER BY  order_progress . date_created DESC
    Error
    Error in compiliing SQL Expression
    Database connector Error: 'HY000[Informix] [Informix ODBC Driver]General Error. Syntax Error[Database Vendor Code-11060]'.
    Now this means, 1: I am getting a connection error with my db, for no apperent reason. 2: my syntax is not approved?!
    Can someone explain why is this happening and how to resolve this?
    many thanks
    Kind Regards
    Jehanzeb

    Morning Kyle,
    Thanks for the informative answer, I have found out the formula which counts number of days however, I am not sure what you meant by the following:
    >
    Kyle McAdam wrote:
    > create a formula that does the datediff....this will be a group.
    Done this, it counts the working days as in weekdays and takes bank holidays out as well
    here is the formula:
    WhileReadingRecords;
    //{order_progress.order_status}= 77;
    //{order_header.order_status}>=77;
    Local DateVar Start := {order_header.date_entered};   // Starting Date
    Local DateVar End := {order_header.act_despatch};  // Ending Date
    Local NumberVar Weeks;
    Local NumberVar Days;
    Local Numbervar Hol;
    DateVar Array Holidays;
    Weeks:= (Truncate (End - dayofWeek(End) + 1
    - (Start - dayofWeek(Start) + 1)) /7 ) * 5;
    Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
    (if DayOfWeek(Start) = 1 then -1 else 0)  +
    (if DayOfWeek(End) = 7 then -1 else 0);  
    Local NumberVar i;
    For i := 1 to Count (Holidays)
    do (if DayOfWeek ( Holidays<i>) in 2 to 6 and
      Holidays<i> in start to end then Hol:=Hol+1 );
    Weeks + Days - Hol;
    You will then have a formula field that is evaluated to 1, if the status is 77.
    you mean second formula? How I used,
    If Order_header.Order_Status=77 then
    1
    else
    2;
    however this doesn't seem to be working.
    > Now, sum that formula in each group footer. Suppress the detail lines...
    which formula to sum up?
    > **Don't use a cross tab with this solution. For a cross tab, you would have to calculate the totals in a different manner.
    so far I used Cross tab and it is showing the right days, however not showing the correct jobs per day.
    You might be right there that it calculates the totals differently, additionally how am I suppose to get the right Percentage if using the Cross tab. The percentage should be, count of number of jobs % Total jobs.
    hence:
    {#NumofJobs} % {#Total_Jobs}
    however, when I create this formula it does not let me add that into the cross tab.
    I also need to put a subreport in my report, can I use Crosstab to contain a link to my subreport?
    Many thanks
    Kind Regards
    Jehanzeb

  • Crystal Report Windows Form Viewer - Error in compiling SQL Expression

    I am using C# and the Crystal Reports API to render reports in a windows application. Recently we decided to start using SQL Expressions in our reports. The reports developers are able to use them in development, but as soon as we deploy the reports to production, we are seeing the following error.
    Why does this work when developing forms but not when using the C# API?

    Hi Adam
    I pinged couple of people here, but so far have not got a reply. I'll update this post as soon as I get anything.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

Maybe you are looking for

  • Apple TV playing up

    My Apple TV has started to mess up starting today, it's lost all of the channels apart from the settings and the computers channels, I HAVE TRIED the plug into iTunes method and it didn't work, I then unplugged it from the way and the Television and

  • Save billing document as pdf file in a shared folder

    hi experts, my requirement is to save the billing documents as a pdf file whenever it is generated automatically. is it possible to define a output type to save the pdf file similar to the one used for sending pdf files as attachemnts in email.

  • Should I up grade to a new phone? i got the itch! There is nothing wrong with my 8300

    Should I up grade to a new phone? i got the itch! There is nothing wrong with my 8300 except for scratches. I am due for the verizon 100.00 up grade and the rebate. Is it worth to up grade? Is there a better black berry on the market like the one I h

  • E-recruitment 3.0 in ep6

    Hi, My company is about to release EP6 (SP12) to our employees and I have had a request to create an iView that contains the "Search for Jobs" bsp application.  We currently have e-Recruitment working with EP6, for example, a link to the Internal Can

  • Eraser in CS5 just stopped working

    I am working on a floor plan in CS5 Photoshop. Just basically tracing over an original document and erasing what I trace over. I do this all the time and it has been working fine. But now the eraser won't work at all. When i turn off all the layers e