How to find System date in the query

Hi,
I have requirement where in the query I need to select the Document delivery date = today's date or system date.
Can any once please let me know how to write the query?
Murali

Select * from ORDR where docduedate=convert(char(8), getdate(), 112)

Similar Messages

  • How to find who has deleted the query in Production system

    I Experts,
    I have an issue. Someone has deleted one query in Production system.
    How can i find who has deleted the query??
    I searched the ans for the same i the below threads :-
    Query deleted in production
    How to find out who has deleted the production Query
    But it didn't help me as i couldn't understand how to use the transaction SLG1.. Can Someone please explain me how can i find out who has deleted the Query..
    Regards,
    Pavan Raj

    Hello,
    Please, remember the date on which date the query has seen last time  in the production server. You can use the last date in the From date and To date would be current  date and execute the SLG1 tcode. It would list you all the logs in the Object text you can search for BEX Query designer and sub object text column you can check for delete logs options.
    Double click on the object will list you the query and name. From the user column you can find who has deleted the query.
    Might be this can help you for analysis.
    Thanks
    Geeta Sharma

  • Display Current/System date in the Query

    Hi,
    Can any one tell me how i can display the current date or system date in Bex Query/report. I tried to use "0DAT" SAP exit as the key date in the "General Properties"... this helps me to execute query based on a Key date, but does not display the date. Can any one tell me, how I can use the current date in my query for some calculations and how I can display the current date.
    Thanks

    Hi Tanu
    If you want to see the query run date along witn query properties in the report output ( after you execute the report).. then go to "Layout".. (please check for Icons) >display text elements> all. ( This is if you are in BW 3.5).. if you are in BI 7.0, then simplay click on information and you will see all the details
    I see you are asking for some calcuation's also.. for that you should see what date fields you have in the backend cube/dsou2026
    Hope this helps
    Thanks
    Kalyan

  • How to find compensation data for the year

    Dear All,
    Scenario:
    A company wants to know the comepnsation data for financial year 2009-2010.
    Problem: I couldnot find a single report which can provide the compensation of an employee for the year.
    We are trying to build a report however needs input if anyone has done that:
    Table which stores this data is PS_COMPENSATION.
    Problem is : it stores data in effective date.
    How to then convert it into a year -April 2010 to March 2011
    For example: cases
    a. existing employee: whose effective comp data will be less than April 2010
    - Plus, there are pay rate changes between April 2010 to march 2011. (Pay rate change can happen on any date of the month)
    - How can I add them to find the Compensation as per comp page from 1st April to 31st march 2011

    I'm afraid what you're looking for is not likely to be a trivial task. If you have all of the modules required for the "Report Total Compensation" product, then you should take a look at the associated PeopleBook. I think you will have to be on HRMS 9.0 at a minimum, and using Payroll for North America and Benefits Administration.
    To create a custom solution, you may have to consider a variety of other factors such job status--leave, terminated, terminated with pay, etc.--hourly vs. salaried, part time vs. full time, multi-job, variable compensation. It will depend entirely on the specific features that are being used at your site.
    If you provide a very detailed example of the output you are looking for with sample data, someone might be willing to offer a solution.
    Regards,
    Bob

  • How to find last  date of the current year

    Hi
    Please tell me is there any function module to find out the last date of the current year.

    Hi,
    You can do that very simply like so.
    code
    report zrich_0001.
    data: first type sy-datum.
    data: last type sy-datum.
    first = sy-datum.
    first+4(4) = '0101'.
    last = sy-datum.
    last+4(4) = '1231'.
    write:/ first, last.
    [/code]
    OR use function modules
    1.use this function module HR_GB_TAX_YEAR_DATES
    Pass these values
    P08_TXYEAR = Year
    P08_PAYROLL_AREA = '01'
    2.use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
    DATA: first LIKE sy-datum,
    last LIKE sy-datum.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
    EXPORTING
    i_gjahr = '2007'
    i_periv = '24'
    IMPORTING
    e_first_day = first
    e_last_day = last.
    WRITE: / 'First Date', first, ' Last Date', last.
    Regards,
    Raj.

  • How to find a data with the minimum value I get without using sub query

    Currently, I manage to get a record by using subquery to find the minimum number, eg:
    SELECT TAccTrn.ASysCde
    FROM TAccTrn
    WHERE TAccTrn.AAccTrnNum=(SELECT Min(TAccTrn.AAccTrnNum)
    FROM TAccTrn, TDbtSchCltDtl
    WHERE TDbtSchCltDtl.ASrcRefId=TAccTrn.ASrcRefId
    AND TDbtSchCltDtl.ASrcRefSubId=TAccTrn.ASrcRefSubId
    AND TDbtSchCltDtl.ASrcRefSeq=TAccTrn.ASrcRefSeq)
    Is there any more idea without using the subquery?

    Hi ,
    What about using an in-line view and the row_number () analytic function...????
    Here is an example....
    SQL> select * from emp;
    EMPNO ENAME      JOB         MGR HIREDATE          SAL      COMM DEPTNO
    7369 SMITH      CLERK      7902 18/12/1980     800,00               20
    7499 ALLEN      SALESMAN   7698 20/02/1981    1600,00    300,00     30
    7521 WARD       SALESMAN   7698 22/02/1981    1250,00    500,00     30
    7566 JONES      MANAGER    7839 02/04/1981    2975,00               20
    7654 MARTIN     SALESMAN   7698 28/09/1981    1250,00   1400,00     30
    7698 BLAKE      MANAGER    7839 01/05/1981    2850,00               30
    7782 CLARK      MANAGER    7839 09/06/1981    2450,00               10
    7788 SCOTT      ANALYST    7566 18/04/1987    3000,00               20
    7839 KING       PRESIDENT       17/11/1981    5000,00               10
    7844 TURNER     SALESMAN   7698 08/09/1981    1500,00      0,00     30
    7876 ADAMS      CLERK      7788 21/05/1987    1100,00               20
    7900 JAMES      CLERK      7698 03/12/1981     950,00               30
    7902 FORD       ANALYST    7566 03/12/1981    3000,00               20
    7934 MILLER     CLERK      7782 23/01/1982    1300,00               10
    14 rows selectedUsing a solution like the one you don't want ...(a subquery) i would write....
    SQL> select ename from emp
      2    where hiredate=(select min(hiredate) from emp)
      3  /
    ENAME
    SMITHWhereas , using an in-line view....
    SQL> select ename from
      2   (
      3    select ename,row_number() over(order by hiredate asc) row_num from emp
      4    )
      5  where row_num=1
      6  /
    ENAME
    SMITHIs it acceptable...????
    Regards,
    Simon

  • How to push System-Data to the SLD ? NWA 7.11

    How can i push the data from a J2EE-system to the SLD that is connected/configured in the NWA (Destinations) ?
    In older versions of NWA there's being a 'collect and send'-button...
    best regards
    Christoph
    Edited by: Christoph Bastian on Aug 17, 2011 3:46 PM

    Hi,
    Perhaps this link could help:
    http://help.sap.com/saphelp_nwce711/helpdata/en/48/b6847d96655295e10000000a42189b/frameset.htm
    The SLD_DataSupplier and SLD_Client destinations should be set in NWA -> Configuration Management  -> Security Management  -> Destinations
    Next under Configuration Management  -> Infrastructure Management  -> SLD Data Supplier Configuration. Collect and Send exists to send the data to SLD.
    Regards,
    Srikishan

  • Spotlight - how to find RTF files with the query language (kMDItemKind,etc)

    Hi folks. I'm trying to come up with a string that will find all RTF files.
    There are many strings for other docs -- like Microsoft Word is
    kMDItemContentType == "com.microsoft.word.doc"
    But I am trying to create one that will find all RTF files. There doesn't seem to be a kMDItem command for extension or anything, and if I type "com.nisus.writer" I'd just be guessing. And I only want to include RTF files.
    I'm probably missing something obvious, but I'm a complete non-programmer (obviously).
    Thanks.

    That's a partial solution, but it would be very helpful if one could somehow get the pathname onto the clipboard.  Being able to see the pathname is a lot less useful than being able to use it.

  • How to get distinct data if the query contains a column with Long Datatype?

    How can we select distinct records based on a LOng column

    From the Oracle 9i SQL Reference:
    LONG columns cannot appear in certain parts of SQL statements:
    n GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the
    DISTINCT operator in SELECT statements
    n The UNIQUE operator of a SELECT statement
    n The column list of a CREATE CLUSTER statement
    n The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
    n SQL built-in functions, expressions, or conditions
    n SELECT lists of queries containing GROUP BY clauses
    n SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or
    MINUS set operators
    n SELECT lists of CREATE TABLE ... AS SELECT statements
    n ALTER TABLE ... MOVE statements
    n SELECT lists in subqueries in INSERT statements

  • How to find creation date of a cron job in RHEL 5

    We have instances having RHEL 5.10 in our setup. I wanted to know how to find the creation date of a cron job in RHEL 5. I was investigating a cron job, hence the query to know the creation date of a cron job.
    I hope my question is clear.
    Requesting a reply to my query.
    Regards

    Sorry to have upset you, but I cannot understand your accusation. Could you please explain where you see aggression in my problem evaluation or where I implied "how dare you"?
    I also provided an explanation why the cronfile in /var/spool/cron is not helpful. If I'm wrong, by all means, please let me and anyone else know.
    If no filesystem is specified I assume the default file system, which under OL 6 is ext4 and xfs under OL 7. Furthermore I was assuming ext3 due to other questions the OP has been asking in a similar context, which you may have not seen. For example: How to find creation date of a file in RHEL 5

  • How to export some data from the tables of an owner with integrity?

    Hi to all,
    How to export some data from the tables of an owner with integrity?
    I want to bring some data from all tables in a single owner of the production database for development environment.
    My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
    These three fields are present in the main system table (the table of contracts). Then I thought about ...
    - create a temporary table from the query results table to contract;
    - and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
    I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
    select r.constraint_name "FK name",
    r.table_name "FK table",
    r.column_name "FK column",
    up.constraint_name "Referencing name",
    up.table_name "Referencing table",
    up.column_name "Referencing column"
    from all_cons_columns up
    join all_cons_columns r
    using (owner, position), (select r.owner,
    r.constraint_name fk,
    r.table_name table_fk,
    r.r_constraint_name r,
    up.table_name table_r
    from all_constraints up, all_constraints r
    where r.r_owner = up.owner
    and r.r_constraint_name = up.constraint_name
    and up.constraint_type in ('P', 'U')
    and r.constraint_type = 'R'
    and r.owner = 'OWNERNAME') aux
    where r.constraint_name = aux.fk
    and r.table_name = aux.table_fk
    and up.constraint_name = aux.r
    and up.table_name = aux.table_r;
    -- + Dynamic SQL
    If anyone has any suggestions and / or reuse code to me thank you very much!
    After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
    Thinking...
    Let's Share!
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • How to find Archive data In SAP

    Hi experts ,
    How to find Archive data in SAP throught the following tcodes FTWL & AS_afb.
    Thnx
    Venky

    Hello,
    Transaction FTWL is for the DART files (not actually archived data) that are stored in your archive server.  In order to run a query, or browse the DART file, you would need to "Import from archive" from within FTWL and then browse the file.
    I am not sure what you mean by AS_afb.  Please provide more information.
    Regards,
    Karin Tillotson

  • Current date in the query

    Hi Experts,
    I want to display current date in the query in one of the time characterstic which i am including in the data target but i don't want to load anything in the data target but still i want to display the current date in the query only.
    how can i achieve this.
    thanks and regards

    Hi,
    It's a real fcahllenge or a non ABAPer.You have to create  a project in cmod and to assign enhancement RSR00002.
    In component EXIT_SAPMRSRU_001 you will find a couple of includes.
    Please add attached code. Replace  YOURCUBE by the name of your info provider and  YOURIO by the name of desired info object.
    *&  Include           ZXRSRTOP
    DATA: G_POS_YOURCUBE_ YOURIO TYPE I.   
    *&  Include           ZXRSRU02
    DATA: L_S_CHANM TYPE RRKE_S_CHANM.
    DATA: L_SUBRC1 TYPE SY-SUBRC. "execute only, if key figure really used
    CASE I_S_RKB1D-INFOCUBE.
      WHEN 'YOURCUBE'.
        L_S_CHANM-CHANM = 'YOURIO'.
        L_S_CHANM-MODE  = RRKE_C_MODE-NO_SELECTION.
        APPEND L_S_CHANM TO E_T_CHANM.
      ENDCASE.
    *&  Include           ZXRSRZZZ
    FORM USER_YOURCUBE USING I_S_RKB1D TYPE RSR_S_RKB1D
            CHANGING C_S_DATA  TYPE ANY.
    FIELD-SYMBOLS <L_YOURIO>.
    ASSIGN COMPONENT G_POS_YOURCUBE_YOURIO  OF STRUCTURE C_S_DATA TO  <L_YOURIO >.
    <L_YOURIO >.= SY-DATUM.
    ENDFRORM.
    Hope it works.
    Good Luck
    Joe

  • [ASK] How to get system date and substring / concate in data manager dynami

    Hello guys.
    I want to run package DM with the input have default value.
    The selection is look like this :
    Dimension : CATEGORY
    Source : PLAN_2011
    Destination : FORECAST_2011
    Dimension : TIME
    Source : 2011.JAN,2011.FEB,2011.MAR,2011.APR,2011.MAY,2011.JUN,2011.JUL,2011.AUG,2011.SEP,2011.OCT,2011.NOV,2011.DEC
    Destination : <same>
    How to get system date year and do the substring / concate ?
    So dimension category source will be PLAN_<YYYY>, destination = FORECAST_<YYYY>
    Dimension source = <YYYY>.JAN,<YYYY>.FEB,<YYYY>.MAR,<YYYY>.APR,<YYYY>.MAY,<YYYY>.JUN,<YYYY>.JUL,<YYYY>.AUG,<YYYY>.SEP,<YYYY>.OCT,<YYYY>.NOV,<YYYY>.DEC
    Depend on year system date.
    Thank you.

    Stuart,How are you storing OnSaleDate. If you are using OnSaleDate as an attribute dimension then you can write a Custom Defined Function to either:1- query your system for the current date and return the number of seconds that have elapsed since 1/1/1970. This is by definition the begining of the Epoch and how Essbase treats Attribute Dimensions of the Date type.public static long getDateInSeconds() {           Calendar cal = Calendar.getInstance();           return cal.getTime().getTime()/1000;}2- Write a Custom Defined Function that will accept the OnSaleDate and return the number of days sincepublic static double daysSince(double myDate) {     return (getDateInSeconds()-myDate )/86400;}

  • How to find Installation Date for each SQL installation

    Dear All,
    I need a basic info. How to find installation date of each SQL instance (My environment running with multiple standalone/cluster instances)?
    So, I need a query to find installation date easily (I don't want to check it in registry by manual). Thanks in advance...

    Hi Balmukund
    This is the same answer that (1) Prashanth posted
    from the start, letter on (2) Stan posted
    this again with the same link, and now for the third time, (3) you posted it with the same link :-)
    * This answer is correct for specific instance.
    The OP asked a solution for several instances. Therefore he should execute this on each instance. As I mentioned he can do it dynamically on all instances, for example using powershell (basic logic is, first find all instances and than post this query in a
    loop).
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]
    Then your answer is correct :)
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

Maybe you are looking for