Errors when applying sql expression on filter, please help

Hello guys
I was trying to put a filter on the date column and filter between timestampadd(sql_tsi_day,-31,current_date) and current_date
I was successfully able to define both field on sql expression of the filter and I selected "is between"
However when I run reports it returns the following errors:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
SQL Issued: SELECT "Year"."Transaction Date" saw_0 FROM tranSale_cube WHERE "Year"."Transaction Date" BETWEEN timestampadd(sql_tsi_day,-31,current_date) AND current_date ORDER BY saw_0
When I using the same timestamp expression on the column formula and run report without filters, the report will return the correct date however though
I am using essbase as the data source.
Please help
Thanks

Thanks
However, the error still exist the same.. This error code returns when I run report based on this one single column
when I put this date column with measures and other columns then run report, I get a different error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42043] An external aggregate is found in an outer query block. (HY000)
SQL Issued: SELECT Product."Brand Name" saw_0, "Up Level"."Trial - level 12" saw_1, "Year"."Transaction Year" saw_2, "Year"."Transactoin Month" saw_3, "Year"."Transaction Date" saw_4, tranSale.count_of_transactions saw_5, Avg(tranSale.count_of_transactions by "Up Level"."Trial - level 12", "Year"."Transactoin Month", Product."Brand Name") saw_6 FROM tranSale_cube WHERE ("Up Level"."Trial - level 12" IN ('0', 'Product Upsell')) AND ("Year"."Transactoin Month" >= '2009 Feb') AND ("Year"."Transaction Date" BETWEEN timestampadd(sql_tsi_day,-31,current_date) AND current_date) ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4
I believe it must be something with the essbase that is not serving OBIEE well. Because I tried the same filter on a different environment not having essbase, it return me the right results..
Could anyone help?
Thanks

Similar Messages

  • 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

  • Error when trying to sign the Applet, please Help

    Hello,
    I have this Error when I am trying to sign my applet, after execut this command :
    jarsigner -verify -verbose -certs test.jar
    jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for classe/JDBC_SQL.class
    And for your information, that I had add the JDBC_SQL.class to the jar file (test.jar) because I made some change to the file JDBC_SQL.java
    so please if you know what can I do to resolve my problem
    Thank you to reponse !
    rania +

    ahh, here is a problem. u made changes to the JDBC_SQL.java and packed the jar file. u have to sign the jar file again.
    let me know if u need futher assistance

  • 1602 and 1604 Errors When Attempting to Restore/Update iPhone - Please Help

    Hi, I've been having trouble with my iPhone 3GS and after wasting many days on trying to solve the problem, I am reaching out for help from those more knowledgeable than me. I have been having this problem for as long as I can remember (I've owned my iPhone for just under a year): whenever I attempt to Restore my iPhone or update its OS, I receive a 1602 or 1604 error on iTunes and the process stops with the iPhone wiped. iTunes refuses to continue the Restore and any further attempts result in the same error. I originally found this work around for the problem after an exhaustive search (4th post down):
    http://discussions.apple.com/thread.jspa?threadID=1363589
    However, every time I wish to Restore or update, I have to follow these long, annoying, unusual steps, and, now that I am coming to the end of my year's warranty, I really want to fix this problem, or get it fixed by Apple if this is not possible.
    The iPhone restores with no problem on another computer in my house, so I guess the problem is with my computer. I have taken the following steps (often many times over and in combination with each other) in my attempts to fix the problem, but with no success:
    1. Uninstalled and reinstalled iTunes
    2. Uninstalled and reinstalled iPhone drivers
    3. Uninstalled and reinstalled all Apple software and drivers
    4. Removed iTunes library, all music and any other iTunes files in music folder
    5. Created a new user account, which is free from any old iTunes settings, opened iTunes and plugged in iPhone
    6. Used different USB ports
    7. Plugged in iPhone after being restored on other computer
    I'm running out of ideas. Can anyone please help?
    Thanks,
    James

    I had all of these problems, and I was able to fix them with the following process. Here is what I did:
    My setup:
    Apple Max OS 10.4.10, Mac G4, with 3rd party USB 2.0 card.
    1. Upgrade to iTunes 7.6 and Quicktime 7.4, Restart and repair permissions
    2. Purchase the iPod Touch Upgrade - It took two tries to purchase. I had to accept to two agreements, and then got an error. I purchased the upgrade again and got an instruction screen. iTunes appeared to download a very small file.
    3. Sync my touch (I still had not upgraded to firmware 1.1.3)
    4. The touch synced, but I had no new functions.
    5. I clicked upgrade, and downloaded the 165GB file.
    6. While the file was downloading I undocked my iPod touch and restarted it.
    7. When the download was complete, it gave me an unknown error because my iPod was not connected.
    8. I connected My iPod and tried to install the update. After several tries, I always got a 1602 error.
    9. I restarted my computer and did a hard restart of my ipod touch. This did not work, I still had 1602 errors.
    10. At this point, I chose to RESTORE my iPod Touch.
    11. After the restore, I chose not to restore any content, and just tested the firmware update. EVERYTHING worked great!
    12. I synced my iPod touch while I watched the keynote. 45 minutes later my sync was complete and 14 Gig of content was restored. The new functions are great. I have already read my .Mac email.
    Message was edited by: gotabmac

  • Error when downloading movie to iPhone5. PLEASE HELP!

    When downloading movie to iPhone5, I receive an error that the movie was downloaded to another device.  Uh, no it was not.  PLEASE HELP!

    Hi Rienner
    Thank u for the tip.
    I try this tip.
    I am suppliying only
    plant,availabilitycheck, loading group and profit center
    to the PlantData Struture.
    Can u find any problem in this fields.
    Thannke & Regards,
    S.Shankar

  • HT201413 how to fix (-1) error on itunes resotre my devise is keep giveing this error when im trying to restore it  please help!!!

    if anyone had this problem could you please help me

    Have you checked the Apple support site? If not, take a look at this -> iTunes: Specific update-and-restore error messages and advanced troubleshooting
    Unable to contact the iOS software update server gs.apple.com
    Error 1004, 1013, 1638, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.
    If you've used some progam with your iPod that wasn't made by Apple, it might have modified the host file.

  • Multiple errors when opening my project file. Please help!

    Hi Everyone,
    I'm new to the forum and I hope someone can help me with a problem I'm having with opening a specific .aep.
    My project crashed. I tried reopening it, but from then I've been getting the following error messages. While restarting my system or AE usually helps, this time the project wouldn't reopen no matter how I approached this.
    Steps I've taken so far:
    -Restarting my computer.
    -Restarting After Effects
    -Importing the .aep file into AfterEffects
    -Opening the file on a different computer.
    -Trashing preferences and reopening the Project in AfterEffects.
    -Opening one of my 5 at a 15 minute interval generated Auto-save files.
    All result in the same error.
    Please see attached images to see the error I'm getting.
    The final message can't be clicked away and when I click the exit button at the top right of the application the application crashes and prompts me with a default windows error screen.
    Used source footage:
    XDCAM files in a .xmf container
    I really hope someone can help me with this problem. Our deadline was yesterday so any help would be much appreciated
    Thanks in advance,
    Lars
    Some information about my system:
    After Effects CC (version 12.0) with all recent updates from the cloud as of 21th of august
    Windows 7 Professional
    Service Pack 1
    Dell Precision T3500
    Intel(R) Xeon(R) CPU W3550 @ 3.07Ghz 3.07Ghz
    8 GB RAM
    64-bit operating system
    Wacom Intuos 4 large pen tablet
    QuickTime 7.7.4

    Solved!! I moved the two plug-ins that were giving me an error and tried to reopen the project. This time I could reopen it.
    Saving the file under a different name now worked and I could continue working on the project. However the composition containing the rotoscoped footage got lost in the process. I just redid this part and rendered the rotoscoped footage as a separate RGBA quicktime to prevent the same thing from happening.
    So happy 50 hours of work were still alive
    Hope this helps anyone experiencing the same problem.

  • ITunes DID recognize new iPad mini, error when updating, now doesn't. Please help. I have a 700 dollar paperweight now.

    Today I bought a brand new iPad mini 2, 32 gb. First, I backed up my old ipad mini to my hard drive. Then, I updated iTunes to the newest version. Then, I plugged in the new iPad mini, went through the set up, iTunes was working fine. I registered the iPad, then it suggested i update the iOS on the iPad. This is where things went south. After a few minutes, it stated "cannot update iOS 7 at this time" or something to that effect. Since that point, iTunes will not recognize the iPad. The iPad shows the "connect to iTunes" screen. When I plug it in, I hear the tone suggesting a new device is connected, but nothing happens. I've tried it in DFU mode, no results. I've tried putting it in recovery mode, nothing happens, just the same screen. I've uninstalled iTunes and reinstalled it, following every step suggested through this site/apple support. I even uninstalled and installed an older version of iTunes (10.7) but same result. I've followed all troubleshooting steps, and nothing is working, so please don't suggest the same olf "iOS: Device not recognized in iTunes for Windows" page.
    What should I do? Do I have to take this to the geniuses at the store? Will they even be able to help without having access to my computer?

    iPad not appearing in iTunes
    http://www.apple.com/support/ipad/assistant/itunes/
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/TS1591
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    iTunes for Windows: iTunes can’t contact the iPhone, iPad, or iPod software update server
    http://support.apple.com/kb/ts1814
    iTunes for Windows: Device Sync Tests
    http://support.apple.com/kb/HT4235
    IOS: Syncing with iTunes
    http://support.apple.com/kb/HT1386
    Apple - Support - iPad - Syncing
    http://www.apple.com/support/ipad/syncing/
    iTunes 10.5 and later: Troubleshooting iTunes Wi-Fi Syncing
    http://support.apple.com/kb/ts4062
    iOS: “Not enough free space” alert when trying to sync
    http://support.apple.com/kb/ts1503
    You may need to delete iTunes on your computer and then reinstall.
    How To Completely Uninstall and Remove All Traces of iTunes
    http://zardozz.com/zz/2008/04/how-to-completely-uninstall-and-remove-all-traces- of-itunes.html/
     Cheers, Tom

  • I'm trying to use the public library to access my icloud email and I keep getting an error message stating icloud is encountered an error when connecting to the server.  Please help.

    I am trying to access my icloud email via a public library and I keep receiving an error message that icloud is experiencing a problem connecting to the server.  Please assist.

    How are you trying, using a web browser?

  • Error when I turn on my phone, please help :(

    So I just bought my M4 15 days ago and last night suddenly it started to turn off itself. When I turn it on, it turn on but not completely turn on. It just turn on the loading part wave. But vibrates from all messages and chats still comes and I can't turn it off again, it just turn off itself when it runs out of the battery... And when I charge, and turn it on again, it back to the loading part wave. I already tried to restart with pins but it didn't work... What should I do? Please :"

    I suggest that you try to repair the phone software using PC Companion..
    Before repairing your device you may want to backup your information first. Check out this topic for more information on how to.
    How to backup?
    If the issue should still remain I think that this needs to be examined and fixed at a repair center. For more information about how to submit your phone for repair and where, contact your local support team.

  • 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

  • Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    First, confirm that ActiveX Filtering is configured to allow Flash content:
    https://forums.adobe.com/thread/867968
    Internet Explorer 11 introduces a number of changes both to how the browser identifies itself to remote web servers, and to how it processes JavaScript intended to target behaviors specific to Internet Explorer. Unfortunately, this means that content on some sites will be broken until the content provider changes their site to conform to the new development approach required by modern versions of IE.
    You can try to work around these issues by using Compatibility View:
    http://windows.microsoft.com/en-us/internet-explorer/use-compatibility-view#ie=ie-11
    If that is too inconvenient, using Google Chrome may be a preferable alternative.

  • 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 when applying patch 3171663(11.5.9 CU2 )..

    hi..
    error when applying patch 3171663(11.5.9 CU2 )
    below error in log file:
    Assigned: file mscplan.odf on worker 1 for product msc username MSC.
    Time is: Sat May 22 2010 21:58:03
    FAILED: file mscplan.odf on worker 1 for product msc username MSC.
    Time is: Sat May 22 2010 21:58:04
    ATTENTION: All workers either have failed or are waiting:
         FAILED: file mscplan.odf on worker 1.
    ATTENTION: Please fix the above failed worker(s) so the manager can continue.
    below error in workerlog.. in adworker1
    ===============================================================================
    The table is missing the index MSC_TRADING_PARTNERS_U2
    or index MSC_TRADING_PARTNERS_U2 exists on another table.
    Create it with the statement:
    Start time for statement below is: Sat May 22 2010 21:58:04
    CREATE UNIQUE INDEX MSC.MSC_TRADING_PARTNERS_U2 ON MSC.MSC_TRADING_PARTNERS
    (SR_INSTANCE_ID, SR_TP_ID, PARTNER_TYPE, COMPANY_ID) LOGGING STORAGE
    (INITIAL 4K NEXT 40K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0
    FREELIST GROUPS 4 FREELISTS 4 ) PCTFREE 10 INITRANS 11 MAXTRANS 255
    COMPUTE STATISTICS TABLESPACE MSCX
    Statement executed.
    AD Worker error:
    The index cannot be created as the table has duplicate keys.
    Use the following SQL statement to identify the duplicate keys:
    SELECT SR_INSTANCE_ID, SR_TP_ID, PARTNER_TYPE, COMPANY_ID, count(*)
    FROM MSC.MSC_TRADING_PARTNERS
    GROUP BY SR_INSTANCE_ID, SR_TP_ID, PARTNER_TYPE, COMPANY_ID
    HAVING count(*)>1
    AD Worker error:
    Unable to compare or correct tables or indexes or keys
         because of the error above
    Time when worker failed: Sat May 22 2010 21:58:04
    ====================================================================
    My application version :11.5.9
    my database version 8.1.7.4
    Regards
    Jaffer Ali

    >
    Use the following SQL statement to identify the duplicate keys:
    SELECT SR_INSTANCE_ID, SR_TP_ID, PARTNER_TYPE, COMPANY_ID, count(*)
    FROM MSC.MSC_TRADING_PARTNERS
    GROUP BY SR_INSTANCE_ID, SR_TP_ID, PARTNER_TYPE, COMPANY_ID
    HAVING count(*)>1
    >
    Pl post the output of the above statement
    HTH
    Srini

  • Error when applying a XSLT transformation

    central instance
    transaction SURVEY
    Extras->Target Group Hierarchy-> Import from file
    select file
    Error when applying a XSLT transformation
    dialog instance working

    Hello Andrey Kuryanov,
    Could make sure you describe the problem more clear as much as you can so that community can help you better.
    Please provide more details with more detailed steps and actual error messge.
    Thanks
    Raja Pamireddy
    Moderator

Maybe you are looking for