Using the default date for presentation variable

In the report I want to use the default date for the presentation variable.
If I use the query like below,default value is giving correctly.but if I pass the date value from dashboard prompt it is throwing error
Anybody help me to modify the below
query to get the valid results?
Timestampadd(SQL_TSI_day,(dayofmonth(date @{asdf}{date '1900-01-01'})*-1)+1,date @{asdf}{date '1900-01-01'})
Edited by: user12255470 on Dec 2, 2010 12:11 PM
Edited by: user12255470 on Dec 2, 2010 12:12 PM

try this:
Timestampadd(SQL_TSI_day,(dayofmonth(date '@{asdf}{1900-01-01}')*-1)+1,date '@{asdf}{1900-01-01}')
mark answers promptly.
J
-bifacts
http://www.obinotes.com
Edited by: bifacts on Dec 2, 2010 3:21 PM

Similar Messages

  • Can we use the AdventureWorks2008R2 data for the real time project.

    Hi,
    In our project we are trying to do the data scrambling on First name, last name and middle name...
    In the regular practice we use to update the names as
    First Name = FN+<PERSON_SNO>
    Last Name = LN+<PERSON_SNO>
    Middle Name = MN+<PERSON_SNO>
    The Problem is the names are not looking realistic, so I thought of applying some logic and updating our PERSON table names based on Person.Person table in adventure works.
    My question is can we use the AdventureWorks2008R2 data for the real time project. Is there any cop right issue.
    Someone please help me solve this issue.
    Thanks
    Karthikeyan Jothi.

    Please read this link content:
    Adventure Works Sample Site
    sqldevelop.wordpress.com

  • How to make a subscription use the default value for a parameter

    Hi everyone,
    I need to use the CreateSubscription method and have this new subscription use a default value for certain parameter. How can I do this?

    Hi Marianne,
    I have to create the subscription programatically, which is different from what you mention. To further clarify my challenge:
    I have three parameters in a report: date-interval (string), start-date (date), end-date (date). If the user selects for example "last week" as the date-interval, the DEFAULT values for the other two are as follows:
    Code Snippet
    start-date=DateSerial(Year(Today),Month(Today),Day(Today)-Weekday(Today)-6)
    end-date=DateSerial(Year(Today),Month(Today),Day(Today)-Weekday(Today)-1)
    The user can then select intervals like "today", "yestarday", "this month" etc, and the other two parameters are calculated based on that date-interval parameter. Now, If I programatically create a subscription to a report that contains these three parameters and set a value of "last week" for the date-interval parameter, the subscription stores the fixed days (say september 10 to september 16) producing a report of the same week every time the subscription is run and not updating the correct interval to LAST-WEEK!. What should I put as the value for start-date and end-date when I create the subscription to have these two params get the DEFAULT calculated value based on the third param date-interval?
    Hope to have been more clear now.

  • How can i implement the default value for this variable?

    In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
    The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
    select
    rec_num into RECS_TO_DELETE
    from sys_config
    where
    sys_code=55;
    But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
    In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable  in case the above SELECT INTO fails for some reason.

    Hi,
    You have to assign a value before the execution...
    DECLARE
        RECS_TO_DELETE NUMBER(9) := 1000;
    BEGIN
        SELECT rec_num
        INTO   RECS_TO_DELETE
        FROM   sys_config
        WHERE  sys_code = 55;
        DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
           DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    END;
    /Regards,

  • Does iCould Control Panel V2 still create new Outlook data files rather than using the default data files already in use?

    This has always made iCloud for the PC an impossibility for me, and seems to be just a plain stupid implementation.  Moving all the calendar and tasks to a proprietary iCloud data file within Outlook breaks so many other things that I need to use within Outlook.  Does version 2 of iCloud Control Panel still work this way?

    Yes, just like Microsoft Exchange, Zimbra, Gmail etc.

  • Can we use the test data dictionery saved for a FM for any other FM

    Hi experts,
    i want to use the test data dictionary which i have maintained for a FM. now i want to use the same data for another FM.
    Can i use that saved dictionary. if yes then how.
    Points are sure.....
    Thanks
    Ashish

    Amit,
    Yes i can, but this fm is calling from some another  applications (front end) and that is a big scenario. and that will be really vary time consuming so i want to do in this way.
    If this is not possible then the last way i have to opt is to do excercise again .
    Thanks

  • How to set a default date for a custom field of Date type in project server 2010.

    hi,
    can somebody help  me.
    How Can i set the default date for a custom field of date type in project server 2010 ?

    Dear Rohan,
    You can set default value to custom field thru Lookup table. Assign lookup table to custom field and set default value to some lookup value (Note: check the “Choose a value to use as a default when adding new item” checkbox).
    Regards,
    Avinash kumar | Blog:http://avigr8.wordpress.com | If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.

  • What is the default bufferTime for the OSMF player?

    Hi,
    I want to know what is the default buffer time for the OSMF player. And can we set it using NetMocker package using netStream.bufferTime? And when we set it once does it remain that afterwards?
    Regards,
    Amit

    NetMocker is used for unit testing OSMF features that depend on NetStream, it's not something that would be of much use in a production application.
    OSMFPlayer (and OSMF) uses the default values for the buffer for  progressive and RTMP streaming video.  For HTTP streaming video, OSMFPlayer (but not OSMF) uses an adapative algorithm to set the buffer (see HTTPStreamingNetLoaderWithBufferControl). You can set the buffer time via MediaPlayer.bufferTime, and it should retain its value.

  • How to use the default database service name on creating procedure for data

    how to use the default database service name on creating procedure for datagaurd client failover ??? all oracle doc says create a new service as below and enable at DB startup. but our client is using/wanted database default service to connect from application on the datagaurd environment (rac to non rac setup).please help.
    Db name is = prod.
    exec DBMS_SERVICE.CREATE_SERVICE (service_name => 'prod',network_name =>'prod',failover_method => 'BASIC',failover_type => 'SELECT',failover_retries => 180,failover_delay => 1);
    says already the service available.
    CREATE OR REPLACE TRIGGER manage_dgservice after startup on database DECLARE role
    VARCHAR(30);BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
    IF role = 'NO' THEN DBMS_SERVICE.START_SERVICE('prod');
    END IF;
    END;
    says trigger created, but during a swithover still the service is listeneing on listener.
    tns entry.
    prod =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (LOAD_BALANCE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod2)(PORT = 1521)) ---> primary db entry
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = proddr)(PORT = 1521)) --> DR DB entry
    (CONNECT_DATA =
    (SERVICE_NAME = prod)
    thanks in advance.
    Edited by: 854393 on Dec 29, 2012 11:52 AM

    Hello;
    So in the example below replace "ernie" with the alias you want the client to use.
    I can show you how I do it :
    First an entry need to be added to the client tnsnames.ora that uses a SERVICE_NAME instead of a SID.
    ernie =
    (DESCRIPTION =
        (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = Primary.host)(PORT = 1521))
           (ADDRESS = (PROTOCOL = TCP)(HOST = Standby.host)(PORT = 1521))
           (CONNECT_DATA =
           (SERVICE_NAME = ernie)
    )Next the service 'ernie' needs to be created manually on the primary database.
    BEGIN
       DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
    END;
    /After creating the service needs to be manually started.
    BEGIN
       DBMS_SERVICE.START_SERVICE('ernie');
    END;
    /Several of the default parameters can now be set for 'ernie'.
    BEGIN
       DBMS_SERVICE.MODIFY_SERVICE
       ('ernie',
       FAILOVER_METHOD => 'BASIC',
       FAILOVER_TYPE => 'SELECT',
       FAILOVER_RETRIES => 200,
       FAILOVER_DELAY => 1);
    END;
    /Finally a database STARTUP trigger should be created to ensures that this service is only offered if the database is primary.
    CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
    DECLARE
    V_ROLE VARCHAR(30);
    BEGIN
    SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
    IF V_ROLE = 'PRIMARY' THEN
    DBMS_SERVICE.START_SERVICE('ernie');
    ELSE
    DBMS_SERVICE.STOP_SERVICE('ernie');
    END IF;
    END;
    /lsnrctl status - should show the new service.
    When I do this the Database will still register with the listener. I don't give that to the clients. That one will still be available but nobody knows about it. Meanwhile "ernie" moves with the database role.
    So in my example the default just hangs out in the background.
    Best Regards
    mseberg
    Edited by: mseberg on Dec 29, 2012 3:51 PM

  • From where to get "First day of the week" data for all the locales, is it present in CLDR spec 24?

    I am trying to get "First day of the week" data from CLDR spec24 but cannot find where to look for it in the spec. I need this data to calculate numeric value of "LOCAL day of the week".
    This data to implement "c" and "cc" day formats that equals numeric local day of the week.
    e.g if "First day of the week" data for a locale is 2 (Monday) , it means numeric value for local day of the week will be 1 if it is Monday that day, 2 if it is Tuesday that day and likewise.

    Hi
    If you want to week to be started with Sunday then use the following formula:
    TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}') if it's retail week(starts from Monday) then the follow below:
    TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}')
    I'm assuming var_Date is the presentation variable for prompt...
    Edited by: Kishore Guggilla on Jan 3, 2011 4:48 PM

  • How to use one variable as a default value for another variable?

    Hi Experts,
    Is it possible to use one variable as a default value for another variable?
    For example:
    Variable 1 = current calendar year month
    Variable 2 = mandatory input ready variable for calendar year month
    I want to use variable 1 as default value for variable 2, but also have the ability to change the month if required.
    Thanks!
    Kathryn

    u can use replacement path variable
    in that case u can replace the values of 1 variable with the another variable...
    but  u cannot do this setting
    u cannot make variable 2 as mandatory
    u cannot enter value for variable 2
    because by default it will take the value of variable 1
    u have to make follow settings
    variable 2
    name , technical name
    processing by = replacement path
    infoobject = ocalmonth
    next tab
    replaced by another variable
    variable name
    offset start , offset lenght
    save and hit okey

  • To change the classification data for a material using BDC

    I have to update clssification data for material in MM02 using BDC so when i record the transaction MM02 using SHDB i am not able to see the value assignment window which i a able to see when i am changing using MM02 transaction directly. So can anyone have an idea regarding this ?
         I have even tried updating classification data using a BAPI BAPI_OBJCL_CHANGE but i am not getting desired results....can anyone suggest me what are the parameters need to be passed to the BAPI. Thanks in advance for your help....

    Hi Nagarjuna,
                       <b>BAPI_OBJCL_CHANGE</b>  :  This BAPI changes an existing classification, or creates the classification if it does not yet exist. The classification is defined by the required entry fields for the object key (ObjectKey), object table (ObjectTable), class name (AllocDetail-Class_Num), and class type (AllocDetail-Class_Type). The default value for the optional date field (KeyDate) is the system date, on which all classifications become valid. The new characteristics and/or values are transferred to different tables according to data type. Numeric, time, and date characteristics are transferred to table AllocValuesNumNew, character and boolean characteristics are transferred to table AllocValuesCharNew, and currency characteristics are transferred to AllocValuesCurrNew.
    The object key (OBJECTKEY) must be transferred in internal format. This means before conversion exits. For example, a material number must be transferred with leading zeros.
    If the BAPI runs without errors, table Return contains no messages of type "E".
    Assignment created:  message CL735
    Assignment changed:  message CL737
    Assignment not changed:  message CL738
    This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.
    The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".
    This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
    You can only use this BAPI for objects that are not classes!
    This BAPI only processes assigned values for classification - not for configuration.
    Reward points if helpful.
    Regards,
    Hemant

  • Windows Client MP is using the default action account to write to the Data Warehouse

    Hi,
    I have recently installed SCOM 2012R2, and am in the process of migrating everthing from SCOM 2007R2.
    Just after I installed the Windows Client MP (version 6.0.7250.0), I started getting this Event 11852:
    OleDb Module encountered a failure 0x80004005 during execution and will post it as output data item. Unspecified error
    : Cannot open database "OperationsManagerDW" requested by the login. The login failed.
    Workflow name: Microsoft.Windows.Client.Win7.ComputerGroup.MemoryTrendsRAM
    Instance name: Microsoft System Center Data Warehouse
    Instance ID: {16781F33-F72D-033C-1DF4-65A2AFF32CA3}
    Management group: 2012SCOMDEV
    This is happening every 7 days and only happening on the Win7 Management pack. I checked the DW logs and found that it was using the default action acount (SCOM ACTION)to send to the DW.  This account doesn't have access to the DW DB.
    I assume it should be using the Data Warehouse action account.  This is how the acount is setup
    Can anyone tell me where I'm going wrong here?  I have not had to touch the permissions for any of the other Management packs.  the rest of them just work.

    For this issue, you can check below link
    http://blog.metasplo.it/2014/01/scom-2012-oledb-module-0x80004005.html
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"Mai Ali | My blog:
    Technical | Twitter:
    Mai Ali

  • Unable to debug/correct the CMOD code for a variable used in a query

    unable to debug/correct the CMOD code for a variable used in a query
    i am using the data in a DSO in a query and using a custom coding variable in that query , but this data not coming in that query ..
    can anyone suggest how to debug that cmod code for the variable?
    code is written in CMOD tocde for the variable.

    belowis the code that i have written for a custom coding for a variable
    *******Start***
    IF i_step = 2.
      CASE i_vnam.
        WHEN 'IC_COMPCD'.
         TYPES:       BEGIN OF gt_itab_DyAuthTable,
                           username  TYPE /bic/afiop_o1200-/BIC/IC_USER,
                           companycode TYPE /bic/afiop_o1200-COMP_CODE,
                      END OF gt_itab_DyAuthTable,
                      BEGIN OF gt_itab_Cocd_all,
                            companycode TYPE /BI0/MCOMP_CODE-COMP_CODE,
                      END OF gt_itab_Cocd_all.
          DATA: gi_itab_DyAuthTable TYPE STANDARD TABLE OF gt_itab_DyAuthTable,
                wa_itab_DyAuthTable TYPE gt_itab_DyAuthTable.
           DATA: gi_itab_Cocd_all TYPE STANDARD TABLE OF gt_itab_Cocd_all,
                wa_itab_Cocd_all TYPE gt_itab_Cocd_all.
          SELECT /BIC/IC_USER
                 COMP_CODE FROM /bic/afiop_o1200
            INTO CORRESPONDING FIELDS OF TABLE gi_itab_DyAuthTable
            WHERE /bic/ic_user = sy-uname.
          LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
            IF wa_itab_DyAuthTable-companycode EQ '*'
              OR
              wa_itab_DyAuthTable-companycode EQ ' '.
              SELECT COMP_CODE FROM /BI0/MCOMP_CODE
                  INTO CORRESPONDING FIELDS OF TABLE gi_itab_Cocd_all.
              LOOP AT gi_itab_Cocd_all INTO wa_itab_Cocd_all.
                l_s_range-low    = wa_itab_Cocd_all-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
          to exit the loop if any one value is */space/all for a user's compcode values
            EXIT.
            ENDIF.
          ENDLOOP.
           if control is here means, the comp codes values didnt have */space
              LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
                l_s_range-low    = wa_itab_DyAuthTable-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
      Endcase.
    Endif.

  • Issue with Date Format for Presentation Variables

    Hi,
    I am using dashboard prompts to capture begin date and end date in presentation variables. The dates selected from calendar are in the format mm/dd/yyyy.
    In Asnwers I need to get a count of days between begin and end dates. I am using the column formula as shown:
    TIMESTAMPDIFF(SQL_TSI_DAY, DATE '@{pBeginDate}', DATE '@{pEndDate}')
    When ever I run the report from dashboard I get the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 1/1/2005 does not match the specified format. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE ''1/1/2005'', DATE ''1/2/2006'' FROM "Dates"')}
    SQL Issued: SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE '1/1/2005', DATE '1/2/2006') FROM "Dates"
    Can anyone help me to reolve this date format issue?
    Thanks,
    Aravind

    Hi,
    see this below links
    Issues with Prompts calender date
    Regards
    Naresh

Maybe you are looking for

  • Issue on a maintenance view

    I want to fetch the data from a maintenance view: V_001_B. I used the select statement to retrieve the data.But, I got a message saying that "it's not a table or a database view or a projection view". Any body please help me, how to retrieve data fro

  • ITunes 6.4 will not install?  Help!

    Good evening everyone, Every time iTunes opens it asks me to install iTunes 6.4 (I believe) or the newest version.  It begins to install and gets maybe about 75% done before an error pops up saying that the network I am on does not contain the resour

  • Playback in audition suddenly starting to skip and stutter?

    I'm using a us 122l and have had no issues with it all, even after somebody accidentally dropped a glass of water onto it a few months back. But last night when I was recording a song, just like I have been for the past year and a half, the program s

  • Air browser: djvu plugin doesn't work

    Hello, I am building a custom air browser for my company using the HTML component. It's working great in general but my company makes extensive use of the djvu technology for online image viewing. Problem: the djvu plugin doesn't work on the air brow

  • Error launching jdev9i on solaris

    I installed jdev9034 version on solaris. After changing the jdk in .conf in jdev/bin , I get the following error launching jdev. The error is Unrecognized option: -XX:MaxPermSize=64M Could not create the JVM Thanks, Sunil