PostgreSQL - error en now()

 
Vista:
Imágen de perfil de Luis

error en now()

Publicado por Luis (1 intervención) el 04/06/2014 01:09:18
buenas tardes muchachos me sale este error , alguien me puede ayudar es una funcion que cree, pero a la hora de llegar al de la fecha me sale este error. el fmod esta en numerico en ese caso es para que grabe la fecha actual de la modificacion en la tabla me pueden ayudar gracias

ERROR: column "fmod" is of type numeric but expression is of type timestamp with time zone
LINE 17: now()
^
HINT: You will need to rewrite or cast the expression.
QUERY: INSERT INTO terminal ( scodter,
snomter,
stelefo,
sdirter,
selimin,
nume_docum,
usuario,
fmod
)
values ( TRIM(in_scodter),
TRIM(in_snomter),
TRIM(in_stelefo),
TRIM(in_sdirter),
TRIM(in_selimin),
TRIM(in_nume_docum),
TRIM(in_usuario),
now()
)
CONTEXT: PL/pgSQL function fn_terminal(character,character,character,character,character,character,character,character) line 10 at SQL statement
********** Error **********

ERROR: column "fmod" is of type numeric but expression is of type timestamp with time zone
SQL state: 42804
Hint: You will need to rewrite or cast the expression.
Context: PL/pgSQL function fn_terminal(character,character,character,character,character,character,character,character) line 10 at SQL statement
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder