Conver number to date

Hi,
I have dates stored as number in the table. I want to convert the number back to date in one of the measures. Can you please tell me how do it do it? I believe I can not use to_date and to_char functions. I tried doing it with CAST(), but it did not work.
Thanks
AK

It depends on the format of your number, e.g.:
select to_date(to_char(20110707),'yyyymmdd') from dual

Similar Messages

  • Not able to convert string attribute to number and date please help me out

    not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out

    Hi,
    You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
    regards,
    Nick

  • How to restrict number of Data Records from Source system?

    Hi,
    How can I restrict the number of Data records from R3 source system that are being loaded into BI. For example I have 1000 source data records, but only wish to transfer the first 100. How can I achieve this? Is there some option in the DataSource definition or InfoPackage definition?
    Pls help,
    SD

    Hi SD,
    You can surely restrict the number of records, best and simplest way is, check which characteristics are present in selection screen of InfoPackage and check in R3, which characteristics if given a secection could fetch you the desired number of records. Use it as selection in InfoPackage.
    Regards,
    Pankaj

  • Dbms_crypto package for number and date data type

    Hi,
    I am using Oracle 10g 10.2.0.3 on Linux 64 bit
    I am tryiing to use dbms_crypto package for the first time to encypt my tables column
    Following are my table columns
    NAME1 VARCHAR2(2000),
    ID1 NUMBER,
    SCORE number
    This table is already populated
    i want to encrypt Name1 and Score column. Following are the functions i have created for Encryption and decryption.
    --For Encryption
    create or replace function get_enc_val
    p_in in varchar2,
    p_key in raw
    return raw is
    l_enc_val raw (2000);
    l_mod number := dbms_crypto.ENCRYPT_AES128
    + dbms_crypto.CHAIN_CBC
    + dbms_crypto.PAD_PKCS5;
    begin
    l_enc_val := dbms_crypto.encrypt
    UTL_I18N.STRING_TO_RAW
    (p_in, 'AL32UTF8'),
    l_mod,
    p_key
    return l_enc_val;
    end;
    --For Decryption
    create or replace function get_dec_val
    p_in in raw,
    p_key in raw
    return varchar2
    is
    l_ret varchar2 (2000);
    l_dec_val raw (2000);
    l_mod number := dbms_crypto.ENCRYPT_AES128
    + dbms_crypto.CHAIN_CBC
    + dbms_crypto.PAD_PKCS5;
    begin
    l_dec_val := dbms_crypto.decrypt
    p_in,
    l_mod,
    p_key
    l_ret:= UTL_I18N.RAW_TO_CHAR
    (l_dec_val, 'AL32UTF8');
    return l_ret;
    end;
    Key: I have stored a key in other schema and calling it by using function get_key().
    Following is my insert
    INSERT INTO Score_table VALUES
    (get_enc_val('John',get_key()),25,get_enc_val(79,get_key()))
    it is giving me following error
    ORA-00932:Inconsistent Datatypes:Expected number got binary.
    I checked, it is an error due to Score field, which is of number type. So do i need to change type of Score field to varchar or is there any other way to encrypt number and date field.
    If i need to change the type then what will happen to the data already in Table and how do i encrypt data already in table.

    Hi,
    Is there any one who can tell me that, do i need to change my table column data type as the encrypted value will be character.

  • How to set page number & current date in sqlplus result

    how to set page number & current date in sqlplus result

    Hi,
    Use the TTITLE command. For example:
    SET     PAGESIZE     15
    TTITLE     LEFT  &_date     RIGHT  "Page:" FORMAT 999 sql.pno     SKIP 2
    SELECT     ROWNUM
    ,     ename
    FROM     scott.emp
    ;Output:
    12-Jan-2011                    Page:   1
        ROWNUM ENAME
             1 SMITH
             2 ALLEN
             3 WARD
             4 JONES
             5 MARTIN
             6 BLAKE
             7 CLARK
             8 SCOTT
             9 KING
            10 TURNER
    12-Jan-2011                    Page:   2
        ROWNUM ENAME
            11 ADAMS
            12 JAMES
            13 FORD
            14 MILLER 
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data. If your question is based on commonly available tables, like those in the scott schema, then you don't have to post any sample data: just post the output.
    Explain how you get those results from that data.
    Always say what version of Oracle (and other relevant softward, SQL*Plus in this case) you're using.

  • Incorrect number of data lines in TST03

    Hi,
    one of our scheduled jobs is being cancelled with no errors but those found on SP12 - Consistency Check:
    Incorrect number of data lines in TST03
    Any idea of what might be happening?
    SM21 reports the following:
    Error 13 for write/read access to a file. File =
    Error at DB commit, return code 016384
    SAP Commit Failed
    Stop Workproc20, PID 9915
    Start Workproc20, 4 times since system startup. PID 10255
    Invalid object name for TemSe object: " "
    Failed to create log for job /SAPAPO/BACKGROUND_SCHEDULING
    Calling program reports invalid handle for TemSe object (magic==X'NULL-ptr')
    Delete session 001 after error 023
    Thanks
    Antonio

    Hi Naveen...
    yes, the problem was solved but it had nothing to do with SAP itself...
    We have our APO system on two servers: the message server (and DB) runs on an iSeries and the application server and LiveCache server on a SuSE Linux machine. This last server has several iSeries shared (NFS) folders mounted and all TemSE objects are created on one of these folders.
    Now the problem is we use a Vision solution for our HA. Whenever Vision is "touching" a file, Linux can't "see" the lock status due to NFS limitations. So, when it is trying to access the same file, a "permission denied" error message is issued to SAP, causing the job to abort and the TemSE object to become inconsistent.
    One solution is to change from NFS to Samba.
    Another one, much faster to implement, is stopping the Vision job during the night period, when those SAP jobs run. Since then, we didn't had any more problems.
    Of course, this is simply a workaround and not a permanent solution!
    Could this be your scenario as well?
    I hope you can solve your problem...
    Merry Christmas and a Happy 2009 for everyone!
    Antonio

  • Reducing Number of Data Points Acquired?

    I am interested in knowing how to reduce the number of data points written to a file that was acquired at 5 Hz. I have tried to lower the sampling frequency below 5 Hz on a Compaq Daq, but I get an error saying that is an incorrect value. So, if I can't sample below 5 Hz, how do I acquire fewer data points, or how do I reduce the number of data points written to the file? I have tried Sample Compression which just ignores  data points. So, an acquired value is written multiple times at the same rate as having no compression at all. I calculated the sampling frequency from the data file witha compression ratio of 20, 30, and 40 to still be at 5 Hz.

    If you want to "compress" your data then you should perhaps try the "Decimate (single shot) VI " Owning Palette: Signal Operation VIs. With this VI you can average down an array. If you have an array sampled with 5Hz and you set the decimating factor to 5, and average=true. Then the output will be an an array downsampled to 1 Hz, with each value equal to the average value of 5 samples in the input array. The decimate function is quite new. It came in Labview 8.2 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Change number of data file

    I need to copy the data files to a SAN and want to change the number of data files form 4 to 1. This is only a small database (22Gb). I don't know how to delete the data files and re create them.
    Regards
    Hans

    Hi Hans,
    no, you can also do it using DBMGUI. The process is really the same as when you're doing a homogenous system copy, the only difference is the target itself is the same db instance.
    You'd have to make sure you've backup up all (data+log) and no further data was created (for example by making a full data backup in ADMIN mode and saving the log). Then you'd need to initialize the DB and specify the desired number of (data) volumes and make sure you select the radio button labelled 'Create instance for recovery' during the initialization process, so the instance will only be put into ADMIN, after which you can then recover (using the backups made in the beginning).
    I'd recommend to test this out yourself on a small (non production) db instance.
    In comparison, from MaxDB version 7.6.00 Build 22 onwards, you would just have deleted the unwanted volumes (taking into respect that the left over volume can hold all data).
    Regards,
    Roland

  • Number of data block problem

    number of data block
    is there any limit for the number of datablocks in a form?
    i have a form that has 8 blocks and all of them are none base,
    some times when i use this form it suddenly closed and a special file (ifrun60_dump file)
    is created.i donot know the reson and i cannot solve the problem
    if you have any idea about this ,plz help me?
    thanks in advance.
    regards ,
    shoja.

    Restriction on the number of objects is documented in the Help topic "Limits" - There is no practical limit to the number of blocks in a form. Certainly 8 is a timy number compared with mosdt forms.
    Contact support and supply them with the dump file, that should help to identify the issue you have.

  • How to create line hart with variable number of data series

    Hello,
    I am student and I am completely new to Flex programming but
    I need to urgently create an app that should have a variable number
    of data series but of ame type of object.
    eg. Profits for X,Y and Z in in run while just corp X in the
    next instance.
    How can I accomodate for this in the app? can someone point
    me in the right direction I would really greatful as this project
    is really crucial for my coursework to get finished in timely
    manner.
    Thank you

    Hey,
    I'm not really sure what you want, but you should check out:
    http://demo.quietlyscheming.com/ChartSampler/app.html
    Which has a list of different types of charts in Flex and
    will hopefully help. Also check out charting from ILOG, which is
    quite good:
    http://www.ilog.com/products/elixir/

  • How to reduce the number of data blocks used by table

    Hi,
    I was trying to reduce the space usage of a particular table of my apex application which stores blob content and therefore deleted many records from it.
    However, the data block usage remained the same as before.
    I have tried to 'analyze' the table and validate the structure,but am unable to overcome this problem.
    Could someone throw some light on what needs to be to reduce the number of data blocks used by this table?
    Best Regards,
    Priya Jetley

    Priya:
    It is likely that the BLOB content defined in your table is being stored 'Out-of-Line'. This means that the LOB columns are stored in segments of their own. These then are the segments that may need shrinking.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_tables.htm#i1006363
    Varad

  • Variable number of data sets in multiplot

    I would like to be able to overlay sets of spectra to compare intensity variations. I am familiar with the multiplot usage, but my question involves how to allow a variable number of data sets to be overlayed. I have a vi that plots a spectrum after the user presses a "load file" button. I would like to add a boolean that when true would continue to stack spectra on the existing plot, and when false would just plot an individual spectrum each time. How can I accomodate a variable number of data sets in the multiplot?

    Assuming you're using the X-Y graph (the word "multiplot" means little to
    me) then each dataset is a cluster of the X array and Y array for that
    dataset. To put several datasets on the graph you make an array of these
    clusters. This should be very clear in the context help for the X-Y plot
    terminal.
    To add spectra you simply append it to the array of spectra already in the
    plot. The brute force and simplest to understand approach would be to use a
    local to retrieve all the data that's currently in the plot as an array,
    append the new plot to the end and write it all back to the plot, either to
    its terminal or via another local. More elegant would be to buffer your
    array of plots internally within the program and have an array of Booleans
    allowing you to selectiv
    ely show/hide plots, either by omitting datasets
    when writing them to the graph or, to maintain consistency in plot styles,
    writing an empty element to the array in place of hidden datasets, but if
    this is meaningless to you then the first suggestion is perfectly adequate.
    jeffrz wrote in message
    news:101-50650000000800000050150000-982303670000@q​uiq.com...
    > I would like to be able to overlay sets of spectra to compare
    > intensity variations. I am familiar with the multiplot usage, but my
    > question involves how to allow a variable number of data sets to be
    > overlayed. I have a vi that plots a spectrum after the user presses a
    > "load file" button. I would like to add a boolean that when true would
    > continue to stack spectra on the existing plot, and when false would
    > just plot an individual spectrum each time. How can I accomodate a
    > variable number of data sets in the multiplot?

  • How to increase the number of data Business Object can pull for a report?

    Hi,
    I would like to ask around how to increase the number of data Business Object can pull for a report. I have a report which pulls data depending on the date range (ex. From 01/01/2007 - 01/10/2007). But, when the data that is pulled exceeds 5000, the report fails. Is there anyway to increase the number of data that BO can pull?
    Thanks

    Bobby,
       to my knowledge we can't change that. Let me explain this, we have setting in the source system for DS default Data Transfer. there we will assign the processes. if you want to assign 4 you need to change the setting in the source system. For flat files we can change in BW System. We can maintain the setting in the Infopackage level(wht we are assigned in the Source System), but we can't change the process.
    in order to check the setting in source system  SBIW--> General Settings --> Control Parameters for Data Transfer.
    we need to change here, this will effect to all the Data Sources. Before making changes check with your basis.
    All the best.
    Regards,
    Nagesh Ganisetti.

  • Process Order Details like batch number, mfg date flow to a new process ord

    Hi Experts,
    I have a doubt in Process Order.
    I have two stage production.
    1. Blending
    2. Packing
    I create a process order for blending and assign a batch number and manufacturing date for Blending operation.
    Release the process order.
    Final Confirmation of the process order.
    I complete all the process, Goods Reciept is done.
    Technically completed the Process Order.
    Now my 1st stage Process order is completed and ready for the 2nd stage production i.e., Packing.
    Now I create a new process order,
    here I am having the problem that I need to enter all the details like batch number, manufacturing date etc..
    I want to avoid this in the 2nd process order.
    How to do this i.e., carry forwarding the details of the 1st process order into the 2nd process order.
    Is there any setting required at the back end?
    I was told about Push operation to rectify the above problem. But I am not clear about that.
    Can any one clearly explain about that step- by - step.
    Thanks in advance,
    Regards,
    B. Praveen
    Praveen

    closing thread

  • To display execise number and date in smartform

    Hi Abappers,
    i want to display execise number and date in smartform and by using driver program also.
    i have taken fields from vbrk,vbrp and send to final internal table,but now i want to display execise number in my Smartform also.
    Thanking u,
    sri.

    Create a window inside window create text element inside that insert field your excise number and date field names.
    Go to form interface -> import parameters declare your internal table name type vbrp/vbrk.
    In your print program smart form function module pass this table.

Maybe you are looking for