Load associate format string using DLR

Hi,
I'm trying to load an associate format string with a DLR from a text datafile.
My DLR has been built like this :
PARENT0,Account CHILD0, Account ALIAS0,Account PROPERTY0,Account PROPERTY0,Account PROPERTY0,Account
Father Child Alias Store ^ mdxformat(...)
The mdxformat(...) code works fine when I add it manually in the outline via EAS
But everytime I load with a DLR I got this error message
\\Record #23 - Error adding Dynamic calc property to member Child (3320)
\\Record #23 -      Level 0 virtual members must have a formula associated with them
I'm using Essbase 11.1.2
I removed the mdxformat from my datafile and the member is load properly.
Regards,
Franck

Finally no solution, I added it manually

Similar Messages

  • Format String using XML attributes

    I need to format a string based on attributes from a schema. I am attempting to do this using an Assign activity and the java embedded format string function. Here is a simplified version of what I am trying to do:
    oraext:format-string('Service Error COD={0}', bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD'))
    When I execute this line I get:
    XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:format-string('Service Error COD={0} ',bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD')). The XPath expression failed to execute;
    The value at bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD' is valid because I can create a dummy xsd:string variable and set it equal to that.
    I also tried to wrap the getVariableData with the get_content_as_string methods and neither worked. I also verified that my format-string function is working because when I substitute just a plain string like ‘T01’ the string is successfully created.
    Any ideas what I am doing wrong or how I can accomplish this?

    If the xml document is to be stored in the Oracle database with the XML SQL Utility, defne elements instead of attributes. XSU utility does not map the attributes of an xml document to the database table.
    Further ref:
    http://xml.coverpages.org/elementsAndAttrs.html

  • Format string using Regular Expression

    Input string output format...
    SELECT q'<select ab_c "ABC", efg "EFG" from dual>' str FROM DUAL
    Output:
    STR                                 
    select ab_c "ABC", efg "EFG" from dual
    Required output format using regular expression...
    STR                                 
    select 'ab_c' "ABC", 'efg' "EFG" from dual

    Regular expressions have many limitations as parsing tools, and you didn't specify the rules you wanted. This expression puts quotes around the non blank string before a quoted string:
    SELECT regexp_replace(q'<select ab_c "ABC", efg "EFG" from dual>',
                          '([^" ]+)( +"[^ ]*")' , '''\1''\2' ) str FROM DUAL;
    STR
    select 'ab_c' "ABC", 'efg' "EFG" from dual
    {code}
    It is not robust - a missing " will confuse it, and you should be using bind variables anyway.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • SQL LOADER and ORA-01861: literal does not match format string

    Hi,
    I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
    as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
    Text file that is generated after loading fails has the following error.
    Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
    ORA-01861: literal does not match format string
    I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
    I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
    I thought that changing its format might solve my problem so i tried this:
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
    Please suggest.
    Thanks alot.
    Best Regads,
    Kam

    Hi,
    It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
    How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
    Sample data to be loaded is :
    1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
    Desc Orders
    O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
    Also not able to understand about POSITION in the control file...?
    Regards,
    Kam

  • Using Formatted Strings in Jython

    Hi !
    Who has experience with Jython inside ODI with the shipped Jython version 2.1 ?
    I tried to use a formatted String which means:
    a="""bfdlhfjds
    fjdklajfkd
    jfkdlajfk"""
    this returns back the following error-message:
    Traceback (innermost last):
    (no code object) at line 0
    File "<console>", line 2
    SyntaxError: Lexical error at line 2, column 0. Encountered: <EOF> after : ""
    i tried it within a standalone installed Jython-Version "2.2.1" on my client and there it works fine.
    Although it is well documented in the Jythondoc(2.1) my odi 10.1.3.4 - jythoy version 2.1 seems not to has this implemented.
    Nevertheless i need it by all means because: if i use Jython to generate a SQL-STMT and use e.g. the <%=odiRef.getFilter()%> -Function in which a CR/LF always can happen, the substitution of ODI substitutes it with multiple lines and the jython-interpreter cannot interpret and gives of course back an error. It's a real nogo !
    thanks in advance
    br harald

    You can't use it at command line...
    But inside a file it's work...
    Inside a KM it 's work. have a look in the LKM SQL to SQL (Jython)
    step Load data (JYTHON)

  • Invalid column name in query string - using Format function

    In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
    strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
    & "HOME_REGION FROM CCC2.CASE_EPRP " _
    & "WHERE (HOME_REGION = 'NCR') AND " _
    "(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
    & "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
    In the Access Query tool I can include this field
    Format(CALL_DATE,'mmm-yy')
    and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
    Format(CALL_DATE,'mmm-yy')
    in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
    Thanks again,
    Rich

    Thank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
    "date format not recognized"
    when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
    to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
    Thanks again for your help.
    Rich

  • Can I use bpws:getVariableData() within oraext:format-string() ?

    I have problem in using the following expression in my "Assign" activity:
    oraext:format-string('|{0}|',bpws:getVariableData('inputVariable','payload','/client:process/client:name_param))
    I get the following error
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>XPath expression failed to execute.
    An error occurs while processing the XPath expression; the expression is oraext:format-string(‘|{0}|',bpws:getVariableData('inputVariable','payload','/client:process/client: name_param')).
    The XPath expression failed to execute; the reason was: internal xpath error.
    Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    </faultstring><faultactor/><detail><exception/></detail></env:Fault></env:Body></env:Envelope>
    Strangely, I can use the following expressions:
    1. concat('|', bpws:getVariableData('inputVariable','payload','/client:process/client:name_param))
    2. oraext:format-string('|{0}|', 'A value')
    Hence, it seemed to me that oraext:format-string() can't take the return value of bpmw:getVariableData() for some unknown reason.
    As I need to use the "format-string" function to create a complicated value based on a number of input values , I need to find a way to work around this.
    Otherwise, I am force to use the "concat" function which make it extra ugly to build the value I need.
    Please help!

    You need to wrap each parameter with striing().
    Something like this: oraext:format-string(*string*($inputVariable.payload/client:inputBase), string($inputVariable.payload/client:inputVal0))
    This way the oraext:format-string will work fine from bpel assign activity as well.
    Racheli.

  • How to skip 3 chars when use "scanf from string" by the parameter "format string" ?

    hi, I want to read a num 123 from the string like that "sfg123" "fgd123" "ghj123"
    I know that I can use "%3s" to skip 3 chars, but it will add an output to "scanf from string"
    So, how to use parameter "format string" not only to skip 3 chars, but also add no output to the "scanf from string"
    Solved!
    Go to Solution.
    Attachments:
    1.JPG ‏15 KB

    Hi Chenyin,
    Try this VI....
    I think... This is what you are expecting....
    <<Kudos are welcome>>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

  • Error while loading an XML document using a structured application

    Hi,
    I try to load an XML document using a structured application defined in the default structapps.fm
    My code is shown down, extracted from the FDK API code sample.
    Problem, I always have the same message :
    "Cannot find the file named e:\xml\AdobeFrameMaker10\file. Make sure that the file exists. "
    Where "e:\xml\AdobeFrameMaker10\" is my install directory.
    So I assume that frame try to find the structapps.fm file but does not find it.
    What else can it be ?
    Does anyone knowns how to achieve this simple task using extendScript ?
    Thanks for any comments, Pierre
    function openXMLFile(myLastFile) {
        var filename = myLastFile.openDlg("Choose XML file ...", "*.xml", false);
        if (filename != null) {
            /* Get default open properties. Return if it can’t be allocated. */
            var params = GetOpenDefaultParams();
            /* Set properties to open an XML document*/
            /*Specify XML as file type to open*/
            var i = GetPropIndex(params, Constants.FS_OpenAsType)
            params[i].propVal.ival = Constants.FV_TYPE_XML;
            /* Specify the XML application to be used when opening the document.*/
            i = GetPropIndex(params, Constants.FS_StructuredOpenApplication)
            params[i].propVal.sval = "myApp";
            i = GetPropIndex(params, Constants.FS_FileIsOldVersion)
            params[i].propVal.ival = Constants.FV_DoOK
            i = GetPropIndex(params, Constants.FS_FontNotFoundInDoc)
            params[i].propVal.ival = Constants.FV_DoOK
            i = GetPropIndex(params, Constants.FS_FileIsInUse)
            params[i].propVal.ival = Constants.FV_DoCancel
            i = GetPropIndex(params, Constants.FS_AlertUserAboutFailure)
            params[i].propVal.ival = Constants.FV_DoCancel
            /*The structapps.fm file containing the specified application must have
            already been read. The default structapps.fm file is read when FrameMaker is
            opened so this shouldn't be a problem if the application to be used is
            listed in the structapps.fm file.*/
            var retParm = new PropVals()
            var fileObj = Open(filename, params, retParm);
            return fileObj
        } else {
            return null;

    Pierre,
    Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
    function openXMLFile ( ) {
        var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
    While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
    Good luck
    Jang

  • Error while loading Data into Essbase using ODI

    Hi,
    I am very new to ODI. I have installed ODI and working on Demo environment only. I havn't done any configuration. I am using Essbase Technology which is coming by default.
    I have created one sample outline in Essbase and a text file to load data into essbase using ODI.
    Following my text file.
    Time     Market     Product     Scenario     Measures     Data
    Jan     USA     Pepsi     Actual     Sales     222
    I am getting the error. I have checked in Operator. It is giving at step 6 i.e. Integration SampleLoad data into essbase.
    Here is the description.
    from com.hyperion.odi.common import ODIConstants
    from com.hyperion.odi.connection import HypAppConnectionFactory
    from java.lang import Class
    from java.lang import Boolean
    from java.sql import *
    from java.util import HashMap
    # Get the select statement on the staging area:
    sql= """select C3_C1 ""Time"",C5_C2 ""Market"",C2_C3 ""product"",C6_C4 ""Scenario"",C1_C5 ""Measures"",C4_C6 ""Data"" from "C$_0Demo_Demo_genData" where      (1=1) """
    srcCx = odiRef.getJDBCConnection("SRC")
    stmt = srcCx.createStatement()
    srcFetchSize=30
    stmt.setFetchSize(srcFetchSize)
    rs = stmt.executeQuery(sql)
    #load the data
    stats = pWriter.loadData(rs)
    #close the database result set, connection
    rs.close()
    stmt.close()
    Please help me to proceed further...

    Hi John,
    Here is the error message in execution tab....
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 20, in ?
    java.sql.SQLException: Unexpected token: TIME in statement [select   C3_C1    ""Time]
         at org.hsqldb.jdbc.jdbcUtil.sqlException(jdbcUtil.java:67)
         at org.hsqldb.jdbc.jdbcStatement.fetchResult(jdbcStatement.java:1598)
         at org.hsqldb.jdbc.jdbcStatement.executeQuery(jdbcStatement.java:194)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx4.f$0(<string>:20)
         at org.python.pycode._pyx4.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    java.sql.SQLException: java.sql.SQLException: Unexpected token: TIME in statement [select   C3_C1    ""Time]
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

  • Parsing formatted String to Int

    How can I parse formatted string to Integer ?
    I have a formated string like this $900,000 and I need to convert it to 900000 so I could do calculations with it.
    I tried something like this
    NumberFormat nf = NumberFormat.getIntegerInstance(request.getLocale());
    ttlMargin=nf.parse(screenVal);I got this exception
    "java.lang.NumberFormatException: For input string: "$1,050,000""

    I am working on the JSP file that provides
    margins,sales etc. I am reading this data off the
    screen where it is beeing displayed according to the
    accounting practices.
    That's why I get it as a formatted string and why I
    am trying covert that string to the numberScreen-scraping is a problematic, bad design. It sounds like what you really want is to call a web service which returns its results as data that a program can understand (XML, for example), not HTML (which is meant more for humans to read). I know, you probably can't change the design at this point... just food for thought. In the meantime, you'll probably have to manually parse those strings yourself by stripping out the '$' and ',' characters and then use parseInt on the result.

  • Loading members to Essbase using ODI

    Hi All,
    We are planning to use ODI to load members from Oracle database to Essbase using ODI. Should we convert all the dimension tables in Oracle database to Parent-Child relation and then load it or can we use the existing hierarchial structure in Oracle database.
    Thanks in Advance.
    Kannan.

    Hi,
    If you reverse engineer an essbase cube it creates columns :- ParentName, MemberName.
    When you load metadata into essbase using ODI it will need to be mapped against Parent and Member, to make it easier it would be useful if your source data is in parent/child format.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error while load data into Essbase using ODI

    Hi ,
    I'm getting the following error while loading measures into Essbase using ODI, I used the same LOG nd Error file and file path for all my Dimensions , this worked well but not sure why this is not working for measures....need help.
    File "<string>", line 79, in ?
    com.hyperion.odi.common.ODIHAppException: c:/temp/Log1.log (No such file or directory)
    Thanks
    Venu

    Are you definitely running it against an agent where that path exists.
    Have you tried using a different location and filename, have you restarted the agent to make sure there is not a lock on the file.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • ViScanf invalid format string due to #sample size data1, data2,... response

    I'm writing a program which will utilize the internal memeory of the Agilent 34410A DMM for making fast measurements (10K/s).  In order to do this, I need to setup a test, have the data stored to the internal memory, then read and delete it, while other measurements are still happening.  The best command for the read/delete function is the R? command, but it returns the data in a strange format which breaks the ViScanf format string.  
    an example of the R? reading in below:
    R? 2
    #231+2.87536000E-04,+3.18131400E-03
    Is there a way to setup the ViScanf format string to handle this?
    Thanks
    Ryan

    Yes, I am using CVI
    If it was just returning one value I would use a simple viScanf function like this:
    viScanf (vi, "%f", fbuf);
    If you do a READ from in the instrument, it returns an array of floats so you need to adjust you viScan fuction parse the string into an array of floats like this (array of 500 for this example):
    viScanf(vi, "%,500f", fbuf);
    The problem is the data response to the R? command starts with the array size and is then followed by the data (#231+2.87536000E-04,+3.18131400E-03).  In the previous example, I need to delete the #, and parse the 231 into an array size variable and then fill an array (fbuf in this case) with the data.

  • SQL Error: ORA-01861: literal does not match format string

    Hello,
    I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,
    create or replace function ssndate(p_date in varchar2 default '03-01-18',
    p_time in varchar2)
    return number
    $if dbms_db_version.ver_le_10 $then
    deterministic
    $elsif dbms_db_version.ver_le_11 $then
    result_cache
    $end
    as
    begin
    return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
    - to_date('01-01-90','dd-mm-yy')) * (86400/2400));
    end ssndate;
    The function ssndate compiled successfully.
    The next step I took was to create a view through the following query,
    create or replace view WEBLOG_VIEWS
    as
    select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
    from WEBLOG;
    This was successful as well. The problem is in the next step where I try to do data grouping.
    create table FINAL_WEBLOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    For this, I got the error,
    Error starting at line 1 in command:
    create table FINAL_LOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    Error at Command Line:1 Column:7
    Error report:
    SQL Error: ORA-01861: literal does not match format string
    ORA-06512: at "DMUSER.SSNDATE", line 11
    ORA-06512: at line 1
    01861. 00000 - "literal does not match format string"
    *Cause:    Literals in the input must be the same length as literals in
    the format string (with the exception of leading whitespace).
    If the "FX" modifier has been toggled on, the literal must
    match exactly, with no extra whitespace.
    *Action:   Correct the format string to match the literal.
    I don't know where I'm going wrong with this.. the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively. If anyone has any clue about this I would be sincerely grateful for any help that I can get!! It's quite urgent..
    The Oracle version is 11.2.0.1.0
    Edited by: 975265 on Dec 5, 2012 5:31 PM

    975265 wrote:
    Ok.. Looks like I touched a nerve there. I apologize. I'm still a student, and this is the first time that I've tried something at this level. I'm still in the learning process, so I was hoping that someone could point me in the right direction in order to "fix" the data.Not so much touching a nerve as simply trying to implement a very very poor, but all too common, practice. Since you are a student (which we didn't know until this post) most people will cut you some slack. However, this little exchange should now be burned into your brain as you move forward. One of the very first rules of programming is to ALWAYS use the correct data types for your data. And along with that, never ever depend on implicit type conversions - always use the proper explicit conversion functions.
    And as a slight follow-on, when considering the appropriate data type, don't assume that just because we refer to a given element as a 'something number' that it is indeed a number. Telephone "numbers" are NOT numbers. U.S. Social Security "numbers" are NOT numbers. U.S. Postal Zip codes are NOT numbers. All are just character strings which, by convention, we limit to the same characters we use to represent numbers.
    And since this entire discussion came up around the representation of dates, you might want to take a look at http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/
    Now, go forth and be a smarter programmer than your peers.
    Edited by: EdStevens on Dec 6, 2012 6:12 AM

Maybe you are looking for