Error 01861
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
01861. 00000 - "literal Does Not Match Format String"
this site About Us Learn more about Stack Overflow the company Business Learn ora-01861 literal does not match format string in java more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Ora-01861 Date
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ora-01861 literal does not match format string sqlldr SQL Error: ORA-01861: literal does not match format string 01861 up vote 21 down vote favorite 3 I am trying to insert data into an existing table and keep receiving an error. INSERT INTO Patient ( PatientNo, PatientFirstName, PatientLastName, PatientStreetAddress, PatientTown, PatientCounty, PatientPostcode, DOB, Gender, PatientHomeTelephoneNumber, PatientMobileTelephoneNumber ) VALUES ( 121, 'Miles', 'Malone', '64 Zoo Lane', 'Clapham', 'United Kingdom', 'SW4 9LP', '1989-12-09', 'M', 02086950291, ora-01861 literal does not match format string ora-06512 at line 1 07498635200 ); Error: Error starting at line : 1 in command - INSERT INTO Patient (PatientNo,PatientFirstName,PatientLastName,PatientStreetAddress,PatientTown,PatientCounty,PatientPostcode,DOB,Gender,PatientHomeTelephoneNumber,PatientMobileTelephoneNumber) VALUES (121, 'Miles', 'Malone', '64 Zoo Lane', 'Clapham', 'United Kingdom','SW4 9LP','1989-12-09','M',02086950291,07498635200) Error report - SQL Error: ORA-01861: literal does not match format string 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. Just not sure why this keeps happening I am learning SQL at the moment, any help will be greatly appreciated! sql oracle sql-insert share|improve this question edited Mar 20 '14 at 19:16 Mike Burton 2,6011428 asked Mar 20 '14 at 19:11 LizzyPooh 150119 can we see your table structure? I suspect it is the phone numbers that are VARCHAR2 or something and you're inserting them as NUMBER –CodeBird Mar 20 '14 at 19:16 @MikeBurton CREATE TABLE Patient ( PatientNo CHAR(5) NOT NULL PRIMARY KEY, InvoiceNo CHAR(5) NOT NUL
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Fdpstp Failed Due To Ora-01861: Literal Does Not Match Format String
Learn more about Stack Overflow the company Business Learn more about hiring developers ora-01861 literal does not match format string in datastage or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Ora-01861 Literal Does Not Match Format String While Inserting
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ORA-01861: literal does not match format string http://stackoverflow.com/questions/22542882/sql-error-ora-01861-literal-does-not-match-format-string-01861 up vote 18 down vote favorite 2 cmd.CommandText = "SELECT alarm_id,definition_description,element_id, TO_CHAR (alarm_datetime, 'YYYY-MM-DD HH24:MI:SS'),severity, problem_text,status FROM aircom.alarms WHERE status = 1 and TO_DATE (alarm_datetime,'DD.MM.YYYY HH24:MI:SS') > TO_DATE ('07.09.2008 09:43:00', 'DD.MM.YYYY HH24:MI:SS') order by ALARM_DATETIME desc"; I get ORA-01861 error when I try to execute this command text. There is no problem with database connection because I can execute basic SQL commands. What is the problem with http://stackoverflow.com/questions/1387917/ora-01861-literal-does-not-match-format-string this statement? sql oracle plsql oracle10g ora-01861 share|improve this question edited Jan 23 '13 at 18:37 a_horse_with_no_name 184k24231308 asked Sep 7 '09 at 7:00 mcgoncu Try running this statement using SQL Plus to see what it has to say about this. If SQLPlus can execute it, ado.net should not have any problem. –shahkalpesh Sep 7 '09 at 7:06 add a comment| 4 Answers 4 active oldest votes up vote 22 down vote Remove the TO_DATE in the WHERE clause TO_DATE (alarm_datetime,'DD.MM.YYYY HH24:MI:SS') and change the code to alarm_datetime The error comes from to_date conversion of a date column. Added Explanation: Oracle converts your alarm_datetime into a string using its nls depended date format. After this it calls to_date with your provided date mask. This throws the exception. share|improve this answer edited Oct 15 '09 at 13:00 answered Sep 7 '09 at 7:09 Christian13467 3,3511527 add a comment| up vote 6 down vote The error means that you tried to enter a literal with a format string, but the length of the format string was not the same length as the literal. One of these formats is incorrect: TO_CHAR(t.alarm_datetime, 'YYYY-MM-DD HH24:MI:SS') TO_DATE(alarm_datetime, 'DD.MM.YYYY HH24:MI:SS') share|improve this answer a
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn https://community.oracle.com/thread/926945 JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in PL/SQL and SQL All PlacesDatabaseDatabase Application DevelopmentPL/SQL and SQL This discussion is archived 4 Replies Latest reply on Jul 7, 2009 11:02 AM by does not Solomon Yakobson Error -1861: ORA-01861: literal does not match format string 710551 Jul 7, 2009 10:41 AM hi i am getting the ORA-01861: literal does not match format string. However my code is mentioned below runtime_call:='insert into mss_examination (exam_id,examination_name,registration_no,examination_session,roll_no,stream_id,remarks,board,vouchar,examinationyear)values (:exam_id,:examination_name,:registration_no,:examination_session,:roll_no,:stream_id,:remarks,:board,:vouchar,:examinationyear)'; DBMS_SQL.PARSE(l_cursor, runtime_call, DBMS_SQL.NATIVE); DBMS_SQL.BIND_VARIABLE(l_cursor, ':exam_id', xmlstr(1)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':examination_name',xmlstr(2)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':registration_no', xmlstr(3)); DBMS_SQL.BIND_VARIABLE(l_cursor, does not match ':examination_session',xmlstr(4)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':roll_no', xmlstr(5)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':stream_id',xmlstr(6)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':remarks',xmlstr(7)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':board',xmlstr(8)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':vouchar',xmlstr(9)); DBMS_SQL.BIND_VARIABLE(l_cursor, ':examinationyear', xmlstr(10)); l_data:=DBMS_SQL.execute(l_cursor); Please help. I have the same question Show 0 Likes(0) 9955Views Tags: none (add) bind_variableContent tagged with bind_variable, dbms_sqlContent tagged with dbms_sql, oracleContent tagged with oracle This content has been marked as final. Show 4 replies 1. Re: Error -1861: ORA-01861: literal does not match format string Toon Koppelaars Jul 7, 2009 10:54 AM (in response to 710551) Can you give a DESCRIBE of the table involved? Is the error occuring for one of the particular lines of code that you are showing us? Wat is the declaration of the xmlstr variable? Edited by: Toon Koppelaars on Jul 7, 2009 12:54 PM Like Show 0 Likes(0) Actions 2. Re: Error -1861: ORA-01861: literal does not match format string Toon Koppelaars Jul 7, 2009 10:59 AM (in response to Toon Koppelaars) And: why are you using dbms_sql, you