To_date function usage in Oracle 11i

Expecting the below output using the query: select sysdate, 'to_date('||''''|| sysdate ||''',''DD-MON-YYYY''),'   from dual;
          08-OCT-2013     to_date('08-OCT-2013','DD-MON-YYYY'),
But, getting the below output, please provide your inputs.
          08-OCT-2013     to_date('08-OCT-13','DD-MON-YYYY'),

Hi,
888976 wrote:
Expecting the below output using the query: select sysdate, 'to_date('||''''|| sysdate ||''',''DD-MON-YYYY''),'   from dual;
          08-OCT-2013     to_date('08-OCT-2013','DD-MON-YYYY'),
But, getting the below output, please provide your inputs.
          08-OCT-2013     to_date('08-OCT-13','DD-MON-YYYY'),
SYSDATE returns a DATE, but the operands of || are strings.  When you use a DATE in a place where a string is expected, Oracle implicitly converts it to a string, maybe in the format you want, maybe in some different format.  Don't rely on implicit conversions.  When a string is required, use a string.  Use TO_CHAR to convert DATEs to strings when the format is important.

Similar Messages

  • TO_DATE function issue in Oracle 10g R2

    Hi,
    This SQL statement works in Oracle 10g R2 env & Oracle 9i R2.
    SQL>select TO_CHAR(TO_DATE(SYSDATE,'DD/MM/RRRR','NLS_DATE_LANGUAGE = ''AMERICAN'''),'RRRR/MM/DD','NLS_DATE_LANGUAGE = ''AMERICAN''') SYSTEM_DATE
    from dual;
    But after changing the session to Arabic it does not work in Oracle 10g R2 env but works in Oracle 9i R2 env.
    SQL> alter session set nls_language='ARABIC';
    SQL>select TO_CHAR(TO_DATE(SYSDATE,'DD/MM/RRRR','NLS_DATE_LANGUAGE = ''AMERICAN'''),'RRRR/MM/DD','NLS_DATE_LANGUAGE = ''AMERICAN''') SYSTEM_DATE
    from dual;
    Some one please confirm this will not work in Oracle 10g R2 env after altering the session.
    Rgds,

    The error message is:
    ORA-01858: a non-numeric character was found where a numeric was expected.\
    Rgds.

  • Oracle date field not comparing properly with to_date function

    Hi, i'm facing a very weird problem. I'm triyng to retrieve a range of records in between two dates. However, it doesn't seem to understand. What am i doing wrong?
    let's say my table (MYRECORD) has this (where id is varchar and date is DATE and not timestamp) :
    ID DATE
    1 22-JAN-08
    2 22-JAN-08
    3 21-JAN-10
    4 11-FEB-10
    5 11-FEB-10
    So, let's say iwanna get the records from 21st Jan 2010 :
    select
    date as ori_date from MYRECORD where
    date = to_date('21/01/2010','DD/MM/YYYY')
    1.)
    it is not returning any record at all. I'm having problems with between dates and the to_date function as well,
    so i'm trying to get the 'equal' part working first. I can't use to_char because at the end of the day,
    i need to compare between dates.
    what am i doing wrong? has this got anything to do with what kind of format is set up on the oracle server?
    running :
    SELECT value FROM v$nls_parameters WHERE parameter ='NLS_DATE_FORMAT'
    returns DD-MON-RR
    2.) how do we compare dates from the table according to our own specified format from our passed string? I only have READONLY access to this database
    so i can't set anything up.

    please run this
    select To_date(date, 'DD/MM/YYYY HH24:MI:SS') as ori_date from MYRECORDprobably you have hour minute second info in your table, to_date('01012010','DDMMYYYY') means hour, minute and second is 00:00:00 so it wont be equal.The database field type is actually 'DATE' and not datetime. I've also ran the sql you provided to show its timestamp, but it's not showing anything as far as timestamp is concerned. It's showing only the date. So does this mean it's a real date only information?
    However, it might be more efficient to do two comparisons, especially if there's an index on dt:
    WHERE   dt >= TO_DATE ('21/01/2010', 'DD/MM/YYYY')
    AND     dt <  TO_DATE ('22/01/2010', 'DD/MM/YYYY')
    Ok. If we change the range to compare it on the same day, it won't work;
    WHERE   dt >= TO_DATE ('21/01/2010', 'DD/MM/YYYY')
    AND     dt <=  TO_DATE ('21/01/2010', 'DD/MM/YYYY')this also happens if we're using BETWEEN
    this is real weird. It's supposed to work...i don't recall having this kind of issue on other databases. If that's the case,
    each time a user passes me a date string i have to somehow add another day onto its 'to' comparison date in order for things to work.
    but..i don't want to since i don't want to accidentally include the extra day's results!
    Edited by: 803998 on Oct 21, 2010 8:14 PM
    Edited by: 803998 on Oct 21, 2010 8:33 PM

  • To_date function in cursor in oracle 8i

    Please tell me how to use to_date in cursor in oracle 8i. when i m using to_date in where clause in cursor it's giving error to_date function is out of scope.

    CURSOR C1 IS
    SELECT A.XO_NO,to_char(A.XO_DATE,'dd-mm-yyyy') XO_DATE,A.TO_CITY,A.FILE_CODE F_CODE,A.ARR_DATE,A.DEP_DATE,A.VCH_TYPE_CODE,
    A.VCH_NO,A.REMARKS,A.AMOUNT,A.COMP_CODE,to_char(A.SERVICE_DATE,'dd-mm-yyyy')SERVICE_DATE,
    B.AGENT_CODE,B.ROOM_TYP_CODE,
    (B.NO_OF_SINGLE+B.NO_OF_DOUBLE*2+B.NO_OF_EX_BED+B.NO_OF_TWIN*2) NO_OF_PAX,
    B.PER_SR SNGL_BED,B.PER_DR DOUBLE_BED,B.PER_EB TWIN,B.PER_DR EXTRA_BED,B.MEAL_PLAN,
    B.EXCH_RATE,A.FILE_CODE,C.COMP_NAME
    FROM XOS_MS A,QUOT_HOTEL_DS B,AC_COMPANY_MS C
    WHERE A.COMP_CODE=B.COMP_CODE
    AND A.XO_NO=B.XO_NO
              AND A.COMP_CODE=C.COMP_CODE
    AND TRUNC(A.XO_DATE)=TO_DATE('21/03/2005','DD/MM/YYYY');

  • Need info about oracle 11i functional

    I Have technical Backround,GNIIT AND cuurently working in ERP & want to be functional consultant in Oracle Apps.
    please let me know:
    1 For which module I need to go for?
    (CRM/SCM/Financial)
    2.Demand of Oracle apps CRM module & SCM module in market?
    3.Is it necessary to do coding to be functional Consultant?
    4.What are the institutes in delhi that provide coaching and placement assistance for oracle 11i aaps
    Thanks
    sugandha

    Can I get webbased OEM in 9i?In case of VPN access
    where I wont have access to TOAD or OEM GUI,if I get
    access to web based OEM this will help me alot to monitor.Check out OEM Grid Control (then, download), it can be used to monitor an enterprise of databases (even 9.x) and app servers, via web GUI much like that of Database Control.

  • Oracle 11i Pay Upon Receipt functionality

    Will Oracle 11i support the Pay Upon Functionality? The version we currently use does not apply credits or changes in the receiving amount when creating a voucher.

    Hello ,
    We are also struggling with the similar problem of reconciling the AR and i would seek your help here.
    I believe you have figured out all the SQL queries used to get the AR recon done so i would request if you can share the SQL queries with me as it will help us to do our piece of activity in reconciling the AR.

  • Oracle 11i Screen Functions

    Question: We currently use Oracle 11i and are in need of a screen that will allow us to save, edit and add records. Our current screen only allows records to be entered and submitted to a job protocol. This presents a problem because it takes approx. 3 hours ea. month end to enter over 110 records and the records are the same with an occasional additional record. I have submitted my request to our CSC with no success. They said that they could not get the additional functionality from Oracle. Pls advise. What are my options?

    Please try this link:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96621/adx05xsj.htm#1023311

  • Oracle 11i Functional Financial Apps Certification

    Hello All,
    Can you please guide me to the path of getting "Oracle 11i Functional Financial Apps" certified? I wish to move into this field. Following is my background -
    Qualifications - BCA (regular); MBA - Finance (regular).
    Work Experience - 1 yr as a Financial Research Analyst with a fortune 500 co.
    Please post your valuable suggestions.
    Regards,
    Manish (Delhi - India)

    Hi Manish,
    There are two certifications available for “Oracle 11i Financials Consultant”:
    1) Oracle 11i Financials Consultant, Payables
    2) Oracle 11i Financials Consultant. Receivables
    The two certifications have two common exams:
    - Oracle E-Business Fundamentals 1Z0-200
    - Oracle General Ledger 11i Fundamentals 1Z0-211
    After that, you have to submit the “Hands on Course Requirement From” and set for one (or both) of the following exams:
    - Oracle Payables 11i Fundamentals 1Z0-212 --> You will become “Oracle 11i Financials Consultant, Payables” certified.
    - Oracle Receivables 11i Fundamentals 1Z0-213 --> You will become “Oracle 11i Financials Certified Professional Consultant, Receivables” certified.
    There is no standard answer for how long it takes to prepare for the exams, having hands on experience would be really helpful in clearing those exams in a short time frame. For the demand, it all differs from employer to employer; some employers prefer having hands-on-experience while others prefer to see certification logo(s) on your Resume before considering you for the job.
    If I were you, I would start having my own 11i instance, and with the help of Oracle E-Business Suite documentation I would start my first functional setup. Oracle provides Vision demo database which comes with seeded data, it should be helpful in understanding how the setup goes.
    Below is couple of links I would recommend as a start:
    Oracle Applications 11i (11.5.10.2+ virtual) Documentation Library
    http://download-uk.oracle.com/docs/cd/B25516_14/current/html/docset.html
    Oracle E-Business Suite OCP & OCE Certification
    http://ebizocp.blogspot.com/
    Oracle E-Business Suite Forum
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Good Luck!

  • Log out function in Oracle 11i

    We are using Oracle 11i and are being logged out of the system within 15 minutes of non-use.
    Can the log out feature be set for individual security levels/groups?
    Can the log out time limit be set individually?
    I am quite new to the Oracle family and hope to become a long time user.

    This is totally the wrong forum for this kind of question, but I'm fairly certain the timeout can be changed via a profile option. You have to sign on as SYSADMIN (or someone with sysadmin responsibility) to change it. I'm not sure if it can be set at different levels though.
    There is an Oracle Apps forum around here somewhere.

  • ** How to use TO_DATE function in Stored Proc. for JDBC in ABAP-XSL mapping

    Hi friends,
    I use ABAP-XSL mapping to insert records in Oracle table. My Sender is File and receiver is JDBC. We use Oracle 10g database. All fields in table are VARCHAR2 except one field; this is having type 'DATE'.
    I use Stored procedure to update the records in table. I have converted my string into date using the Oracle TO_DATE function. But, when I use this format, it throws an error in the Receiver CC. (But, the message is processed successfully in SXMB_MONI).
    The input format I formed like below:
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">
    Value in Payload is like below.
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">TO_DATE('18-11-1991','DD-MM-YYYY')</X_EMP_START_DT>
    Error in CC comes as below:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_EMP_DETAILS' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('18"
    Friends, I have tried, but unable to find the correct solution to insert.
    Kindly help me to solve this issue.
    Kind Regards,
    Jegathees P.
    (But, the same is working fine if we use direct method in ABAP-XSL ie. not thru Stored Procedure)

    Hi Sinha,
    Thanks for your reply.
    I used the syntax
    <xsl:call-template name="date:format-date">
       <xsl:with-param name="date-time" select="string" />
       <xsl:with-param name="pattern" select="string" />
    </xsl:call-template>
    in my Abap XSL.  But, its not working correctly. The problem is 'href' function to import "date.xsl" in my XSLT is not able to do that. The system throws an error. Moreover, it is not able to write the command 'extension-element-prefixes' in my <xsl:stylesheet namespace>
    May be I am not able to understand how to use this.
    Anyway, I solved this problem by handling date conversion inside Oracle Stored Procedure. Now, its working fine.
    Thank you.

  • How to use quarter format in "to_date()" function?

    Hi,
    I'm trying to use to_date() function with quarter format. How do I specify the format?
    For example to convert '2002 quarter 1' using the to_date function.
    I tried to_date('20021', 'YYYYQ'), and I got ORA-01820 cannot appear in date input format.
    Please help, thank you!!!

    You cannot use Q when inputting data, only when retrieving data. When inputting, you must enter a valid date. Oracle has to store a date and if you just enter a quarter, it can't figure out what date to store. See the examples below:
    SQL> -- test table:
    SQL> CREATE TABLE test_table
      2    (test_date DATE)
      3  /
    Table created.
    SQL> -- the wrong way to input:
    SQL> INSERT INTO test_table (test_date)
      2  VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
      3  /
    VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
    ERROR at line 2:
    ORA-01820: format code cannot appear in date input format
    SQL> -- the right way to input:
    SQL> INSERT INTO test_table (test_date)
      2  VALUES (TO_DATE ('27-OCT-2002', 'DD-MON-YYYY'))
      3  /
    1 row created.
    SQL> -- to output:
    SQL> COLUMN "Year and Quarter" FORMAT A16
    SQL> SELECT test_date,
      2         TO_CHAR (test_date, 'YYYY-Q') AS "Year and Quarter"
      3  FROM   test_table
      4  /
    TEST_DATE   Year and Quarter
    27-OCT-2002 2002-4
    1 row selected.

  • Equivalent of to_date function in Ms SQL and using it in Evaluate function

    Hi,
    I am trying to find out a function in MS SQL which is equivalent to to_date function in oracle. Please find below the advanced filter i am trying to use in OBIEE.
    Evaluate('to_date(%1,%2)' as date ,SUBSTRING(TIMES.CALENDAR_MONTH_NAME FROM 1 FOR 3)||'-'||cast(TIMES.CALENDAR_YEAR as char(4)),'MON-YYYY')>=Evaluate('to_date(%1,%2)' as date,'@{pv_mth}'||'@{pv_yr}','MON-YYYY') and Evaluate('to_date(%1,%2)' as date ,SUBSTRING(TIMES.CALENDAR_MONTH_NAME FROM 1 FOR 3)||'-'||cast(TIMES.CALENDAR_YEAR as char(4)),'MON-YYYY') <=timestampadd(sql_tsi_month,4,Evaluate('to_date(%1,%2)' as date,'@{pv_mth}'||'@{pv_yr}','MON-YYYY'))
    The statement above works fines with oracle DB with to_date function. The same statement throws an error with MS SQL since to_date is not a built in function.
    With MS SQL I tried with CAST, not sure how to pass parameters %1 and %2.
    Please help me how to use Evaluate function and passing parameters along with to_date funtion in MS SQL.
    Regards!
    RR

    Hi,
    please refer to this thread for useful information on using to_char and to_date functions of oracle in MS SQL server:
    http://database.ittoolbox.com/groups/technical-functional/sql-server-l/how-to-write-to-to_char-and-to_date-sql-server-351831
    Hope this helps.
    Thanks,
    -Amith.

  • Accounts Receivable Reconciliation - Oracle 11i

    I am sorry this is long but I am trying to be detailed!
    I am trying to help one of my users reconcile AR for Banking purposes. Oracle offers a very nice way to do this with the AR Reconciliation Report (ARXRECON.rdf). The problem we have is that we need to differentiate from Domestic and Export customers as the bank considers Export transactions as “High risk” and will not allow those transactions to be considered as a factor in our ability to borrow.
    This report does not do this. The report is based off of built in procedures and thus I can’t/don’t know how to modify. The solution I have devised is to reproduce the report using queries as Oracle as detailed how the report works (below). The first step is to come up with the exact numbers Oracle details in the report and then once I have the SQL to do that I can make modifications to only pick up Domestic or Export customers.
    ***Quote***
    THE AR RECONCILAITION REPORT
    The AR Reconciliation Report shows the summary amounts of various AR
    reports, that are used to reconcile your AR.
    AR is reconciled when the "Aging on the beginning of the Period" + "The
    Total Activity in the Period" is equal to the "Aging on the end of the
    Period".
    The Total Activity in a period is calculated as follows:
    Transaction Register for the Period
    (-) Applied Receipts Register for the Period
    (-) Un-Applied Receipts Register for the Period
    (+) Adjustments Register for the Period
    (-) Invoice Exceptions for the Period
    (+) Rounding Differences for the Period (*)
    (+) Credit Memo gain/loss for the Period(*)
    (*) These can occur only in the case of foreign currency transactions.
    ***End Quote***
    I have had no issues in writing SQL statements for the Items which make up the period activity. However I cannot seem to get the “Beginning” / “Ending” Balances.
    The documentation details the following on how they derive the beginning and ending balances is here:
    ***Quote***
    Beginning and Ending Balance:
    To get the beginning and ending balances the report uses the same procedure. The As of Date for the Beginning period is GL Date Low-1 where as the As Of date for the Ending balance is GL Date High.
    The report selects all transactions from AR_PAYMENTS_SCHEDULES_ALL table which are not receipts and have a GL Date equal to or less than the As Of date, AND a GL Date Closed which is greater than the As Of date.
    For all records returned which are not credit memos, the report calculates and sums up all the receipt and credit memo applications which have a GL date of greater than the As Of date from the AR_RECEIVABLE_APPLICATIONS_ALL table. This total is termed as Accounted_Amount_Applied_To.
    For all credit memos, the report calculates and sums up all the applications which have a GL date of greater than the AS Of date from the AR_RECEIVABLE_APPLICATIONS_ALL table. This is called the Accounted_Amount_Applied_From.
    Any approved adjustments tied to these transactions are also calculated
    and summed up that have a GL date of greater than the As Of date.
    The report also sums up the Accounted Amount Due Remaining for all
    transactions.
    The final value the report calculates to get the Beginning/Ending Balance is the sum of all Unapplied, On-Account and Unidentified Receipts which were closed after the As Of date.
    The Beginning and Ending balance is calculated using the following
    equation:
    Beginning/Ending Amount = Sum of all Accounted Amount Due Remaining
    + sum of Accounted_Amount_Applied_To
    - sum of Accounted_Amount_Applied_From
    - sum of all approved adjustements
    + ( - sum of all unapplied receipts)
    ***End Quote***
    I am a novice when it comes to understanding the database structure of Oracle 11i and the above details are a little spotty on where and what fields are being summed up. So far I have written these (again note that I am trying to tie to the report…adding the functionality to select Domestic verses Export will come later and is not an issue) SQL statements which should give me an individual number for each part for which I can do calculations with to get the actual balance:
    --AR Beginning Balance Queries
    --Sum ACCTD_AMOUNT_DUE_REMAINING
    Select Sum(AR_PAYMENT_SCHEDULES_ALL.ACCTD_AMOUNT_DUE_REMAINING) as ACCTD_AMOUNT_DUE_REMAINING
    From AR_PAYMENT_SCHEDULES_ALL
    Where AR_PAYMENT_SCHEDULES_ALL.GL_DATE <= :date1
    and AR_PAYMENT_SCHEDULES_ALL.GL_DATE_CLOSED > :date1
    and AR_PAYMENT_SCHEDULES_ALL.org_id = :org
    -- Sum ACCTD_AMOUNT_APPLIED_TO
    Select Sum(AR_RECEIVABLE_APPLICATIONS_ALL.ACCTD_AMOUNT_APPLIED_TO) as ACCTD_AMOUNT_APPLIED_TO
    From AR_RECEIVABLE_APPLICATIONS_ALL
    Where AR_RECEIVABLE_APPLICATIONS_ALL.GL_DATE > :date1
    and AR_RECEIVABLE_APPLICATIONS_ALL.APPLICATION_TYPE <> 'CM'
    and org_id = :org
    --Sum ACCT_AMOUNT_APPLIED_FROM
    Select Sum(AR_RECEIVABLE_APPLICATIONS_ALL.ACCTD_AMOUNT_APPLIED_FROM) as ACCTD_AMOUNT_APPLIED_FROM
    From AR_RECEIVABLE_APPLICATIONS_ALL
    Where AR_RECEIVABLE_APPLICATIONS_ALL.GL_DATE > :date1
    and AR_RECEIVABLE_APPLICATIONS_ALL.APPLICATION_TYPE = 'CM'
    and org_id = :org
    --AR Beginning Balance Queries (End)
    I am not sure how to calculate the “approved adjustments” or what they consider “unapplied receipts” can someone please help me? Also if you believe my above queries aren't pulling the correct totals please elaborate on that as well.
    Thanks in advance!

    I think you will get response faster if you go to the Oracle App. forum.
    http://forums.oracle.com/forums/categoryHome.jspa?categoryID=84
    Thanks

  • Oracle 11i e-Business General Ledger Lead

    Skills -- Oracle 11i e-Business General Ledger implementation
    Job description:
    High profile consulting client seeks a solid Oracle 11i GL Lead for an overseas contract position. This is an excellent opportunity for anyone seeking to gain experience overseas with a Fortune 500 company. All visa requirements will be taken care of by the company.
    Candidate must have experience implementing Oracle e-Business Suite 11i for the GL module with three+ years implementing relevant Oracle products.
    Application Team Lead for Oracle GL
    * Design the Oracle Applications configuration and RICEW component customizations to meet the business process design and application requirements.
    * Use the business process requirements to drive out application requirements and metrics.
    * Assist in defining and reviewing requirements for the application.
    * Validate the design with the stakeholders to ensure that the design satisfies the requirements.
    * Supervise client in completing designs.
    * Inform the project manager of any issues that may affect other areas of the project as discovered.
    * Participate in quality management reviews as outlined in the Validation Task Overview ensuring the application design and related work products satisfy the requirements.
    * Develop an application prototype and conduct conference room pilot to validate the configuration design and explore Oracle Applications gap resolution options.
    * Conduct Oracle Applications training for conference room pilot participants.
    * Participate in transitioning the designs to the programmers and ensure a clear and complete understanding of the designs.
    * Understand that this role is more focused on the overall process flow and user experience than the integration solution designer role.
    * Provide status to project management regarding the process area.
    * Knowledge of the functionality provided by Oracle Applications
    * Ability to transform customer requirements into a workable design at the functional and/or technical levels
    * Ability to translate functional requirements into technical terms relevant to Oracle Applications to coordinate and assist with the detailed technical design tasks
    * Facilitation experience for conducting user design and review sessions and running stakeholder agreement meetings
    * Familiarity with Joint Application Design (JAD) session, Conference Room Pilot (CRP), and similar approaches and principles
    * Familiarity with business process design concepts and principles
    * Deep functional knowledge of Oracle Applications: configuration/development experience is not necessary, but knowledge of how functionality can be supported through the technology is needed
    * Some project management skills
    Location: Hong Kong, HK
    Pay rate: open and daily expenses will be covered with benefits
    Length: 6 months+
    Project language: is English
    NOTE: CHAINESE LANGUAGE IS MANDATORY AND ANY EXPERIENCE IN CHINA OR HONG KONG IS ADVANTAGEOUS
    Kindly apply your resume to [email protected] contact nos: India: +91-9989482244, London: +44 7799 112 005 with updated resume, contact details, pay rates and availability for the project

    Thanks to previous responder for tip regarding JDK/JRE anchor strings. I'm not sure if that is a problem. After letting the install process (java.exe) run for over an hour, I finally got past the InstantiateFile step. It looks like the process just takes a long time with no visible progress sometimes. After 5-6 hrs, it looked like the install succeeded (for the most part). There were still some errors in the error logs related to the Concurrent Manager (TNS-12541: TNS:no listener) I believe. If anyone has insight on what this error msg means, I would greatly appreciate a reply.
    The other problem I am tackling right now is how to explicitly set the Forms processing mode to HTTP rather than the default socket mode. According to the 11i docs (and Forms Developer 6i docs), you should only have to set "connectMode=HTTP" in the config file, appsweb.cfg, to make this happen. However, when I try bringing up a client form, the form hangs. So, obviously, something is amiss. A related question is whether one can run Forms in only HTTP mode and not HTTPS (and thus avoid having to install SSL). I would greatly appreciate any insight from fellow users.

  • Case sensitive field in to_date function

    update "Ab_Order" set "OrderDate" = to_date("Order Date String", 'yyyy/mm/dd)
    Here the OrderDate column is of type Date
    "Order Date String" is varchar2. Iam trying to copy the data from "Order Date String" which contains data in this format '2011/04/24' to OrderDate column to perform some date functions
    when I try to run this query it gives a error: ORA-01830: date format picture ends before converting entire input string
    So I tried to run this query by creating a test table wit 2 columns : update testtable set column1 = to_date(field1, 'yyyy/mm/dd')
    where column1 is date field and field1 is varchar2 and this worked.
    So Iam assuming this is the problem with case sensitive fieldnames . As far as i know we should include case sensitive fields in double quotes. Is there anything else to do wit the to_Date function. Can anyone please let me know how to do that.

    Hi,
    Welcome the the forum!
    882431 wrote:
    update "Ab_Order" set "OrderDate" = to_date("Order Date String", 'yyyy/mm/dd)It looks like you're missing a single-quote right before the last ')'.
    Here the OrderDate column is of type Date
    "Order Date String" is varchar2. Iam trying to copy the data from "Order Date String" which contains data in this format '2011/04/24' to OrderDate column to perform some date functions
    when I try to run this query it gives a error: ORA-01830: date format picture ends before converting entire input stringThat error occurs when when you have characters in the 1st argument that do not correspond to anything in the 2nd argument. For example:
    TO_DATE ( '30-Aug-2011 12:00'
         , 'dd-Mon-yyyy'
         )In this example, TO_DATE doesn;t know what to do with the ' 12:00' at the end of the 1st argument. According to the 2nd arguemnt, there's only supposed to be 11 characters in the string. So it raises the ORA-01830 error.
    So I tried to run this query by creating a test table wit 2 columns : update testtable set column1 = to_date(field1, 'yyyy/mm/dd')
    where column1 is date field and field1 is varchar2 and this worked.
    So Iam assuming this is the problem with case sensitive fieldnames . As far as i know we should include case sensitive fields in double quotes. Is there anything else to do wit the to_Date function. Can anyone please let me know how to do that.Case sensitive column names are a bad idea because they cause so amny problems, but I don't think this is one of those problems. It's more likely that you need to use SUBSTR (or some other string manipulation function) on "Order Date String" before using it in TO_DATE.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables, so people can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.

Maybe you are looking for

  • Installation problem on windows 2000

    Hi, Please help! I've been tring to install oracle on windows 2000 machine unsuccessfully. the setup program aborted without error message. I've tried many versions of oracle database, 8.1.7 all editions, 8.1.6ee, 9iAS. the only message error I got w

  • UCCX 10 CUIC Custom Report (using external data source)

    Hi. We have a customer where we are storing information in an external data source. We would like to built a report and import that report into their UCCX CUIC System in order for the customer to have the new report along side with the UCCX built-in

  • Numbers Expression translated to Obj-C - Possible?

    The following formulas in Numbers I wish to translate into Obj-C. I can't figure it out.... > I need to declare the value of X=3, Y=1.5, and Z=99 (in Numbers: =IF(E8="X",3,E8), etc to declare Y & Z) > Need to create an expression for the SUM of the L

  • Could not save "IMG_5116.psd" because write access was not granted.

    "Could not save "IMG_5116.psd" because write access was not granted." i keep on getting this error message     why/?????

  • Find/Change Item Numbers and create Table of Contents

    Hello! I need help to find all my item numbers and apply a paragraph style to it so I can use them to create a Table of Contents page. Sample item numbers #12345 #12345-5 #12345-20 #12345-ABC #12345/N I tried entering #^?^?^?^?^? on the Find/Change b