
Consulta sentencia update
Publicado por Matias (2 intervenciones) el 03/08/2016 15:00:54
Buenas, este es mi primer post, y estaría teniendo un problema con una sentencia:
Estoy unificando un campo que tenia tipo date, que solo tenia valores de fecha, y por otro lado tenia un campo hora con la hora pero tipo varchar.
EXPFECHAIN | EXPHORA
10/10/2012 | 10.45
10/10/2012 | 10.55
10/10/2012 | 10.45
10/10/2012 | 10.55
10/10/2012 | 10.58
En total son 735 mil filas.
Lo que quiero hacer es pasar unificar los campos, añadiendo la hora al atributo expfechain, la sentencia que tengo es:
update testing_mesajur.expedien set testing_mesajur.expedien.expfechain = to_date(to_char(expfechain, 'DD/MM/YYYY') || ' ' || exphora, 'DD/MM/YYYY HH24:MI:SS')
Las primeras 5 mil filas me las hace bien, pero luego me larga este error que no puedo identificar su causa:
Error que empieza en la línea: 43 del comando :
update testing_mesajur.expedien set testing_mesajur.expedien.expfechain = to_date(to_char(expfechain, 'DD/MM/YYYY') || ' ' || exphora, 'DD/MM/YYYY HH24:MI:SS')
Informe de error -
Error SQL: ORA-01861: el literal no coincide con la cadena de formato
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.
Estoy unificando un campo que tenia tipo date, que solo tenia valores de fecha, y por otro lado tenia un campo hora con la hora pero tipo varchar.
EXPFECHAIN | EXPHORA
10/10/2012 | 10.45
10/10/2012 | 10.55
10/10/2012 | 10.45
10/10/2012 | 10.55
10/10/2012 | 10.58
En total son 735 mil filas.
Lo que quiero hacer es pasar unificar los campos, añadiendo la hora al atributo expfechain, la sentencia que tengo es:
update testing_mesajur.expedien set testing_mesajur.expedien.expfechain = to_date(to_char(expfechain, 'DD/MM/YYYY') || ' ' || exphora, 'DD/MM/YYYY HH24:MI:SS')
Las primeras 5 mil filas me las hace bien, pero luego me larga este error que no puedo identificar su causa:
Error que empieza en la línea: 43 del comando :
update testing_mesajur.expedien set testing_mesajur.expedien.expfechain = to_date(to_char(expfechain, 'DD/MM/YYYY') || ' ' || exphora, 'DD/MM/YYYY HH24:MI:SS')
Informe de error -
Error SQL: ORA-01861: el literal no coincide con la cadena de formato
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.
Valora esta pregunta


0