oracle sql - a non-numeric character was found where a numeric was expected -
i know there loads of postings regarding fixing error but, i'm not understanding it!
val_strg1
value 01.04.2016
. want use , not show lines date older current date, (i.e. and trunc(sysdate) < dv.val_strg1
).
but, though have used to_date format, still a non-numeric character found numeric expected
error?
i have tried several to_date formats;
to_date(val_strg1,'ddmmyyyy')
, to_date(val_strg1,'dd-mm-yyyy')
the following gives me 'not valid month'
error?
to_date(val_strg1,'dd-mon-yyyy')
my script...
select val_strg, val_strg1, to_date(val_strg1,'ddmmyyyy') sd_domainval_org name = 'hypercare_cunr' order sort_no
how can use val_strg1
date?
it seems using text column (e.g. varchar2) date. , saying that
to_date(val_strg1, 'dd.mm.yyyy')
results in error. have value in column not match pattern. here query find such invalid entries:
select * domainval name = 'hypercare_cunr' , not regexp_like(val_strg1, '^[[:digit:]]{2}\.[[:digit:]]{2}\.[[:digit:]]{4}$');
you can correct wrong entries, better solution of course not store dates in string columns @ all. use date columns instead, not have such issues.
Comments
Post a Comment