Please explain me the date query

If I query this
1)select to_char(sysdate,'DD-yyyy') from dual;
25-2007
select to_char(sysdate,'D-yyyy') from dual;
2-2007
3)select to_char(sysdate,'DDD-yyyy') from dual;
176-2007
4)select to_char(sysdate,'DDDD-yyyy') from dual;
1762-2007
5)select to_char(sysdate,'DDDDD-yyyy') from dual;
17625-2007
select to_char(sysdate,'DDDDDD-yyyy') from dual;
176176-2007
I am getting such outputs. Can you explain me this behaviours

hi,
the only valid formats for Day qualifier are:
DD - returns the day of the month (ei 25)
DDD - returns the day of the year (ei 176 days from 1 Jan until 25 June)
However, when you specified the qualifiers such as D, DDDD, etc. you still got the outputs and that is because Oracle gets the first valid qualifiers and appended the other valid qualifiers.
ei. when you say:
1. select to_char(sysdate,'D-yyyy') from dual;
     you got 2-2007 because oracle returns the first digit in the DD format which supposed to return 27.
2. select to_char(sysdate,'DDDD-yyyy') from dual;    
       you got 1762-2007 because oracle recognizes DDD so it returns 176 which is the number of days in a year (until 25-Jun) plus one D that returns the first digit of 27, so altogether you got 1762.
3. select to_char(sysdate,'DDDDD-yyyy') from dual;     
       you got 17625-2007 because oracle recognizes DDD = 176 plus DD = 25.
4. select to_char(sysdate,'DDDDDD-yyyy') from dual;
       you got 176176-2007 because oracle recognizes DDD = 176 plus DDD = 176

Similar Messages

  • The Director role is optional in Lync Server 2013 - could anyone please explain why the director server has lost its importance??

    Could anyone please explain why the director has been removed from spotlight as it had much importance in LYNC 2010 and now being an optional role in LYNC server 2013.[any call flows regarding director servers would be much useful]

    Hi SJ Praveen,
    A Director is a server running Lync Server 2013 that authenticates user requests, but does not home any user accounts. Lync 2013 Front End servers have the same registrar service and functionality
    as the Director.
    The Director isn't providing any special functionality. If the Director goes down, all pools would become inaccessible when the clients queried DNS for the SRV record until an administrator
    makes a manual internal DNS change that points users to a Front End pool to handle the sign-in request from Lync clients. Microsoft has made the Director functionality relevant for organizations that have specific security requirements, such as allowing all
    external users to register to a specific internal server instead of the Front End servers. This server role is merely optional and not needed for most Lync Server 2013 deployments.
    Best regards,
    Eric

  • Please explain how the method CHECK_CHANGED_DATA works?

    Hi experts,
       Can any of you experts please explain how the method <b>CHECK_CHANGED_DATA</b>
    of <b>CL_GUI_ALV_GRID</b> class works ?
    Thanks in advance
    regards,
    Ashwin

    DATA: l_valid TYPE c.
    Data grid1 type ref to cl_gui_alv_grid.
    CALL METHOD grid1->check_changed_data IMPORTING e_valid = l_valid.
    This method checks if any data is changed on the grid if there any editable fields .
    And updates the changed values
    Message was edited by:
            Chandrasekhar Jagarlamudi

  • Could you please explain about the  chain and end chain and module

    hi experts
    could you please explain about the  chain and end chain and module keywords?

    Hi Naresh,
    Conditions for Multiple Screen Fields
    To ensure that one or more PAI modules are only called when several screen fields meet a particular condition, you must combine the calls in the flow logic to form a processing chain. You define processing chains as follows:
    CHAIN.
    ENDCHAIN.
    All flow logic statements between CHAIN and ENDCHAIN belong to a processing chain. The fields in the various FIELD statements are combined, and can be used in shared conditions.
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1> ON CHAIN-INPUT|CHAIN-REQUEST.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.
    ENDCHAIN.
    The additions ON CHAIN-INPUT and ON CHAIN-REQUEST work like the additions ON INPUT and ON REQUEST that you use for individual fields. The exception is that the module is called whenever at least one of the fields listed in a preceding FIELD statement within the chain meets the condition. So <mod1> is called when one of the fields <fi> meets the condition. <mod2> is called when one of the fields <f i> or <g i> meets the condition.
    Within a processing chain, you can combine individual FIELD statements with a MODULE statement to set a condition for a single field within the chain:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    FIELD <f> MODULE <mod1> ON INPUT|REQUEST|*-INPUT
    |CHAIN-INPUT|CHAIN-REQUEST.
    MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.
    ENDCHAIN.
    The module <mod1> is called when screen field <f> meets the specified condition for individual fields. <mod2> is called when one of the fields <fi> or <f> meets the condition. If you use the addition ON CHAIN-INPUT or ON CHAIN-REQUEST with FIELD <f>, the condition also applies to the entire chain and module <mod1> and <mod2> are both called.
    In cases where you apply conditions to various combinations of screen fields, it is worth setting up a separate processing chain for each combination and calling different modules from within it.
    The functions of the FIELD statement for controlling data transport also apply when you use processing chains. Within a processing chain, screen fields are not transported until the FIELD statement. Processing chains also have another function for the FIELDS statements that they contain. This is described in the section on validity checks.
    Ex:
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    CHAIN.
    FIELD: INPUT1, INPUT2.
    MODULE MODULE_1 ON CHAIN-INPUT.
    FIELD INPUT3 MODULE MODULE_* ON *-INPUT.
    MODULE MODULE_2 ON CHAIN-REQUEST.
    ENDCHAIN.
    FIELD INPUT1 MODULE C1 AT CURSOR-SELECTION.
    CHAIN.
    FIELD: INPUT2, INPUT3.
    MODULE C2 AT CURSOR-SELECTION.
    ENDCHAIN.
    MODULE CURSOR AT CURSOR-SELECTION.
    Regards,
    Sunil

  • Hi could someone please explain why the iPhone 5 is $600 dollars more expensive to buy in australia than in the US

    hi could someone please explain why the iPhone 5 is $600 dollars more expensive to buy in australia than in the US

    bazzerk wrote:
    The phones on the us site appear to me to be  the unlocked phones. the contract phones are even cheaper . Australian taxes account for a 10% price diference but really all the Apple products sold in Australia are at least 30% more expensive than in the US and other markets . Why are the local (Aus) apple retailers continuing to price gouge . The ACCC must act to stop this blatant con job..
    There are no options currently on the USA Apple online store site to pre-order unlocked iPhone 5's.  The iPhone 5's currently available for pre-order are only availble by selecting a carrier and agreeing to a 2year contract.  The prices listed are all contract-subsidized prices.

  • Please explain me about data mating. i got a question in the interview

    dear experts,
    can any body help me in explanation about the data mart, what is the functionality of the data mart altogether. what are the senarios we use the data mart concept.
    please respond with a clear elaboration of the topic.

    hi krishna,
    in data mart staus cube, ods behaves like sources.means whenever u want to load data from one data target to oher, then v ll get dm staus.its my self bw system.
    ODS:
    whenever u create update rules on ods, ods technical name will be prefixed with 8,
    means its ready to behave like source to other targets.
    CUBE;
    in case of cube its different, manually we have to make it as source, by right click on cube, click on export generate data source,now the update rules name ll be
    8 followed by cube name.
    u can check the data mart staus in manage data target screen, in request tab page..u ll find one column dm staus.
    hope it helps,
    assign points,
    regards,
    yunus

  • Please explain about the RODELTAM table

    Hi,
    I am going thru the RODELTAM table. I understand that this table is used to check my delta type.
    I had clicked on contents button and then on the execute button. Now the screen that appears has a table with few columns and there is the text log column in the end. I don't understand how to read this table and some terms mentioned in this table.
    The first column is DELTA and underneath this column, there are few abbrevations such as ABR, A, ADD, AID, AIED, AIM AIMD D, E NEWD, NEWE, O, and X. Can someone please expand each of these terms, and explain what does each of these terms mean?
    The columns that are shown are:
    1. DELTA:
    2. ONLYFULL,
    3. UPDM_NIM
    4. UPDM_BIM
    5. UPDM_AIM
    6. UPDM_ADD
    7. UPDM_DEL
    8. UPDM_RIM
    9. DREQSER
    10. DELATYPE
    11. TXTLG
    Also please expalin me the purpose of each of the above mentioned columns.
    Thank you.
    TR.

    Hi,
    RODELTAM table contains the details abt DELTA PROCESS like
    ABR, A, ADD, AID, AIED, AIM  ets
    Delta only with Full Upload (ODS or InfoPackage Selection)
    A ALE Update Pointer (Master Data)
    ABR Complete Delta wth Deletion ID Using Delta Queue (Cube-Cap.)
    ABR1 As 'ABR' Procedure, but Serializatn only Request by Request
    ADD Additive Extraction Using Extractor (e.g.LIS-InfoStructures)
    ADDD As 'ADD' but via Delta Queue (Cube Enabled)
    AIE After Images Using Extractor (FI-GL/AP/AR)
    AIED After-Images with Delete Indicatr via Extractr (FI-GL/AP/AR)
    AIM After Images Using Delta Queue (e.g. FI-AP/AR)
    AIMD After Images wth Deletion ID Using Delta Queue (e.g. BtB)
    CUBE InfoCube Extraction
    D Unspecific Delta Using Delta Queue (Not ODS-Capable)
    E Unspecific Delta Using Extractor (Not ODS-capable)
    FIL0 Delta Using File Import with After Images
    FIL1 Delta Using File Import with Delta Images
    NEWD Only New Records (Inserts) via Delta Queue (Cube Enabled)
    NEWE Only New Records (Inserts) via Extractor (Cube Enabled)
    O
    ODS ODS Extraction
    X Delta Unspecified (Do Not Use!)
    check RODELTAMT BW Delta Process (Text)  table also for more details and also
    check this link
    http://help.sap.com/saphelp_nw04s/helpdata/en/84/81eb588fc211d4b2c90050da4c74dc/frameset.htm
    Hope this helps
    Anand Raj

  • Can you please explain about the vehicle management system?

    Hi ,
    i want to know about the module (vehicle management system) .please explain any one in details .
    Regards
    Venkata .

    Hi Venkata,
    The Vehicle Management system (VMS) is part of SAP IS - Auto. Generally it is said that it is used by importers, however I would rather put it like this – It can be used for an importer or a distributor’s business functions. So if an OEM is also performing a distributor’s business, he can also use VMS and get benefited out of it.
    The VMS facilitates to see a Vehicle like a Vehicle in the system.
    Following are the few high level features -
    It allows to capture all the attributes of a  particular vehicle as an unique object in the system
    All the transaction on a vehicle (sales, purchase etc.) can be carried out keeping vehicle as a central object, provides ease of operation to users. All business and technical data of the vehicle is available here.
    Strong configuration based vehicle search and vehicle history (transactions) helps in tracking the vehicle easily for any purpose in the distribution chain of OEMà Distributorà Dealerà End Customer.
    This is in brief about VMS.
    Regards,
    Aseem Baruaole
    Mahindra Satyam

  • Please explain how the transpose function works

    I have a row of data. I choose a blank cell, choose the transpose function, highlight the data in the row that I want to appear in a column.
    Shouldn't that then move the entire row of data into a column beginning with the cell I have the function in?
    All I get is the first piece of data in the cell where I put the function.

    you use the index function to read out the proper item from the result of the transpose function.
    I placed a range in B3:b10 and transposed it into range B2 over to the right.
    =Index(transpose($B$3:$B$10),1,column(cell)-1)
    Transpose returns a horizontal range in this case, so I need to grab the first row, but the column is the column I am in -1 (I want my first cell to go in column B of my row).
    For future reference, *this information is located in the program in two locations*.
    1) Under the function insert menu, tap the blue arrow to see the help file.
    2) In the equation, tap once on the bubble with the function name in it, then wait a second and tap a second time. the help file opens above it. Both locations mention the index function to return the values.
    Jason

  • Can anyone please  suggest for the following query relating to OEDQ ?

    I have to process 10M  records through batch matching by Oracle EDQ.  There will be 10 file(.csv)  each size 1M. They will be placed landing area of EDQ one by one separately. Given, All 10 file should have same number of columns & same order of columns. I have to process them one by one sequentially through only single batch contact match job.
    Condition is : 
    Only one batch job will be executed 10 times to process them. At each iteration/operation, one file (.csv) will be taken as input in that job. As we know, only one source is present in  job. I have to create /run ShellScript which will be passing  one file to the single snapshot  via single datastore from the landing area of EDQ. Once the one input file  is passed and complete matching is done, Without changing anything, Is it possible to pass 2nd input file  to that snapshot via previously created datastore by that Shell-script.
    I mean, I want to pass one by one file  sequentially  via  single snapshot via single datastore to a batch job  using unix shellscript. 
    Is it feasible to consider in my project????
    Any suggestion will be highly appreciated. Thanks in advance.

    Hi Mike,
    Thanks for the quick response.
    Keeping in mind source will be changed sequentially/one after another but the target is constant & the same JOB will be executed each time.
    suppose, I have two file in the landing area of EDQ. These file are:  PersonData.csv  and goutam.csv
    PersonData.csv is used in current data store.
    File in the working area:    C:\Program Files\Datanomic\dnDirector\config\landingarea\PersonData.csv
    Snapshot is using  this datastore. I have right clicked on the snapshot. I have done setting externalize option enable.
    I am using the command:
    java -jar jmxtools.jar runopsjob -job "Testing for R3  source A" -project EDQ-CDS -runlabel Nov2014 -nowait -u dnadmin -p p4dqnvo2 localhost:9005
    This command is successfully executing batch job "Testing for R3  source A "   where source is PersonData.csv.
    Now, I  want to use the following command with externalize option to execute  the file goutam.csv as source  by the above job.
    I am using the below command:
    java -jar jmxtools.jar runopsjob -job "Testing for R3  source A" -project EDQ-CDS -runlabel Nov2014 -D externalized=goutam -nowait -u dnadmin -p p4dqnvo2 localhost:9005
    this command also executes the file PersonData.csv instead of goutam.csv file.  In the above command I have highlighted  externalize option with deep black color . please let me know how I write this externalize option in the command so that it should execute goutam.csv file.
    Meanwhile, I am googling to find solution.
    Regards,
    Goutam Samanta

  • All the dates I have put on my Ical and even on the calendar of Iphone are disappeard, please help, all the dates I have put on my Ical and even on the calendar of Iphone are disappeard, please help

    I have a IMac and IPhone, because Of Icloud, all my appointments disappeared from the both apple accessories, can you help me please?

    Thank you Carolyn, I understand that and do use the same P/w for both the iphone and the computer and the apps were origionally for the iphone anyway, they just used to back on the computer and now they wont and the imac even cancels them off my iphone when I sync. And it says "Itunes" has made an error, try again...with the coes -54 and -50. This means I canot ack up my iphone properly. 

  • Could some one please explain what the "Master P/W"

    I would be grateful if someone could explain why we have a Master p/w & an Admin p/w. What exactly is each needed for?
    I am really after clarification here to obtain a clear understanding of each one.
    I have a 2008 iMac, originally running Leopard now latest Lion.

    A Master Password is only required if you are using FileVault to encrypt the hard drive.

  • Please explain me the code

    RANGES : r_matnr FOR mara-matnr .
    SELECT lifnr
             matnr
                INTO CORRESPONDING FIELDS OF TABLE t_data
        FROM zdata
       WHERE lifnr = p_lifnr.
      LOOP AT t_data .
        r_matnr-sign   = 'I' .
        r_matnr-option = 'EQ' .
        r_matnr-low    = t_data-matnr .
        APPEND r_matnr .
      ENDLOOP.
    SELECT mblnr
             matnr
                menge
        INTO TABLE lt_menge
        FROM mseg
         FOR ALL ENTRIES IN lt_itab
       WHERE mblnr = lt_itab-mblnr
         AND matnr IN r_matnr

    Hello madan,
    RANGES : r_matnr FOR mara-matnr .
    """range is being declared for material number
    SELECT lifnr                         "Account Number of Vendor or Creditor
                  matnr                      "Material number
    INTO CORRESPONDING FIELDS OF
                 TABLE t_data          "respective fields of internal table
                  FROM zdata           "Source table
      WHERE
                lifnr = p_lifnr."p_lifnr is used  as selection criterion
    "From the naming convention P_lifnr looks like a parameter entered by user
    "So all material numbers and A/C numbers for a particular account number are being selected
    "The following process is defining a range.r_matnr will contain all Material numbers
    which are available for the account number P_lifnr
    eg:imagine that you have 1,2,3  matnr having LIFNR '001' from ZDATA
    then:::::after this loop r_matnr eill contain 1,2,3>
    LOOP AT t_data .
    r_matnr-sign = 'I' .
    r_matnr-option = 'EQ' .
    r_matnr-low = t_data-matnr .
    APPEND r_matnr .
    ENDLOOP.
    "select X from Y where matnr IN r_matnr" means
    it will select field X from table Y
    where material number = '1' or '2' or '3'...(based on matrn in the t_data)
    you are selecting from MSEG some fields which have material numbers in ZDATA for a particular
    account number and which have mblnr values in lt_itab...ie records which have mblnr from lt_itab
    and material number from ZDATA for the account number from the database table  mseg
    SELECT mblnr
    matnr
    menge
    INTO TABLE lt_menge
    FROM mseg
    FOR ALL ENTRIES IN lt_itab
    WHERE mblnr = lt_itab-mblnr
    AND matnr IN r_matnr
    Reward if useful
    Regards
    Byju

  • Please explain me about customer exist program ZXRSRU01

    Hi all,
    I do not have enough knowledge to code for a customer exist.
    please explain me for the below scenerio.
    Dimensions                                                        Key figures
    Business Partner (ZH11).                                    
    Created On Date (ZH22).
    Status (ZH33). 
    Product (ZH88)
    Product contains following
    Product l1(zid1)
    Product release description.
    for this product release description for every new release we creating a variable.
    and using this variable we are creating a restricted key figure as follows.
    1.1 1.2 1.3. like this
    My requirement is a query is already created for report to show bugs weekly releases.
    I have to find out a way if the transaction contains a new version then i have to add new column in the output of the report (for example 1.4,1.5...)
    as I do not have knowledge in ABAP please explain me how to solve this problem.
    I do not have enough regarding Zxrsruo1.
    if contains some predefined components.
    Please explain for the predefined components.
    IMPORTING
    *"     VALUE(I_VNAM) LIKE  RSZGLOBV-VNAM
    *"     VALUE(I_VARTYP) LIKE  RSZGLOBV-VARTYP
    *"     VALUE(I_IOBJNM) LIKE  RSZGLOBV-IOBJNM
    *"     VALUE(I_S_COB_PRO) TYPE  RSD_S_COB_PRO
    *"     VALUE(I_S_RKB1D) TYPE  RSR_S_RKB1D
    *"     VALUE(I_PERIV) TYPE  RRO01_S_RKB1F-PERIV
    *"     VALUE(I_T_VAR_RANGE) TYPE  RRS0_T_VAR_RANGE
    *"     VALUE(I_STEP) TYPE  I DEFAULT 0
    *"  EXPORTING
    *"     VALUE(E_T_RANGE) TYPE  RSR_T_RANGESID
    *"     VALUE(E_MEEHT) LIKE  RSZGLOBV-MEEHT
    *"     VALUE(E_MEFAC) LIKE  RSZGLOBV-MEFAC
    *"     VALUE(E_WAERS) LIKE  RSZGLOBV-WAERS
    *"     VALUE(E_WHFAC) LIKE  RSZGLOBV-WHFAC
    *"  CHANGING
    *"     VALUE(C_S_CUSTOMER) TYPE  RRO04_S_CUSTOMER OPTIONAL
    Thanks,
    James

    Hi James,
    You are talking about the include we use to write the user exit for variables in BW.
    There are a lot of code examples that Edwin posted in the forum so you can use them to code yours.
    A little bit of details on the paramaters in the include:
    I-Vnam : The variable name to be calculated
    i_t-Var_range: A table that contains all the system's variables data
    i_step: The step for variable determination: 0,1,2 or 3.
    i_step= 1: used to call default variables, called once per variable before the variable screen is displayed
    istep= 2: used for those variables that are not ready for input, called after the variable screen is displayed
    i_step=3 : Used for valiadation purposes, and called after isep=2
    e_t_range: Is the table that the exit populated the varaible value to.contains the following important fileds:
       low: contains the value of the lower limit for intervals, for text variables it contains the text and for formula vatiables the calculated value.
       high: contains the upper limit for intervals
       sign: ususally I (Include), can be also E (Exclude)
       opt: usually EQ (Equal) or BT(Between)
    See also:
    https://websmp202.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
    Hope it helps, if so please assign points,
    Gili

  • Explain me the following replace statement

    Hi guys,
    Please explain me the following replace statement with an example :
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc WITH ''''''.
    Please explain me the purpose of the above statement by showing the input and output.
    Regards,
    Vishu.

    Hi Rob,
    It's working fine .Thank you.But I just want to know the purpose of it as the functionality in one of the programs I have seen is as below  :
    Requirement :
    Need to get all the material groups and description2 based on the material descriptions we enter in the selection-screen .
    The program is coded in such a way that all the single quotes are replaced with double quotes :
    The following 3 statements are written in the code  :
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc  WITH ''''''.
    REPLACE ALL OCCURRENCES OF '*'  IN materialgroup_desc WITH '%'.
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc  WITH ''''''.
    and finally the result string is concatenated between quotes again to query the data.
    For instance if we give MAT'ER*IAL as the input it is converted to 'MAT''''ER%IAL'
    and by querying with a select statement using
    materialgroup_desc LIKE 'MAT''''ER%IAL' we are getting the required data.
    Hope you understand mny question.Please explain me why we are replacing the single quotes with double quotes 2 times.Is it a way to skip the special characters.
    Regards,
    Vishu shetty.

Maybe you are looking for

  • How can I manually refresh a Materialized View

    Hi, There's a materialized view created in 2006 as under: CREATE MATERIALIZED VIEW "schema"."mv_name" USING INDEX REFRESH FAST ON DEMAND WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE AS SELECT * FROM "table_name@dblink;

  • Is It Possible To Run 2 Routers At The Same Time.

    This might be the dumbest question of all time but I am not computer savy. My two wireless PCs operate beautifully on my Linksys WRT54G. If, when I get the MacBook Pro, and for some strange reason I have connection proglems, can I get one of the airp

  • Media player for my website....

    Hello all, We need a media player according to the following specifications: 1. Our media player will function as a pop-up, and play as long as surfer is browsing our site. 2. Our media player will include a dynamic playlist functionality. The key fe

  • Standard Asynchronous ES for Quality Management interface

    Hi, Synchronous standard ES is available for Quality Management interfaces under ES bundle.  Could you please suggest if there is any standard Asynchronous ES available for above QM interfaces like Inspection plan, Inspection results and Usage Decisi

  • Thumbnail problem in IE

    For some reason, unbekown to me, I have a thumbnail gallery where the thumbnail border line is equal in FF, Safari and Opera. In IE there's a thickish black line at the bottom of the thumbnails. Any ideas how to make the borders all equal please? Lin