What is the difference between varcha2 and nvarchar2

Hi Experts,

Could someone please describe the difference between the varcahr2 and the nvarchr2.is it important difference to store the data of nvarchar2 column, I am trying to load data from a flat file to column navarchar2 I get error like this

ORA-01861: literal does not match the format string

Thanks in advance...

Kind regards
Surya

Surya says:
I description table like:

SQL > desc emp
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNAME NVARCHAR2 (50)
JOINDATE DATE
NUMBER OF SAL

When I try to insert date below values as:

INSERT INTO EMP (JOINDATE) VALUES (TO_DATE (' 2011-03-09 00:00:00 "," DD/MM/YYYY HH12:MM:SS'));))

error is:

ERROR on line 1:
ORA-01810: put the code appears twice

And this has to do with varchar2, nvarchar2 Vs?
Anyway, your date format mask is incorrect. To convert the minutes, MI should be used and not MM.
In addition, if you try to convert from 00:00:00 to 12-hour format, it will trigger ORA-01849 time must be between 1 and 12 error.
check if TO_DATE (' 2011-03-09 00:00:00 "," YYYY/MM/DD HH24:MI:SS') meets your needs.

Tags: Database

Similar Questions

Maybe you are looking for