Insert current date and time in table

0

The following table was created, I request to be able to insert the current date and time in which the process is carried out

  create table "informix".ventas_saldos
  (
    f_inicial date not null ,
    f_final date not null ,
    c_almacen varchar (250),
    sw_costo smallint,
    sw_consulta smallint,
    usuario char(30) not null,
    sw_genera_consulta smallint,
    ts_creacion datetime year to fraction(3)
    default current year to fraction(3)
  );

I tried to do it in different ways.

INSERT INTO ventas_saldos(f_inicial,f_final,c_almacen,sw_costo,sw_consulta,usuario,sw_genera_consulta,ts_creacion) values ('15/06/2017','15/06/2017','7,1',0,0,'ct060901',1,sysdate()) ;

INSERT INTO ventas_saldos(f_inicial,f_final,c_almacen,sw_costo,sw_consulta,usuario,sw_genera_consulta,ts_creacion) values ('15/06/2017','15/06/2017','7,1',0,0,'ct060901',1,now()) ;

INSERT INTO ventas_saldos(f_inicial,f_final,c_almacen,sw_costo,sw_consulta,usuario,sw_genera_consulta,ts_creacion) values ('15/06/2017','15/06/2017','7,1',0,0,'ct060901',1,CURDATE()) ;

but in the three options I get the following error:

  

674: Routine (sysdate) can not be resolved.

    
asked by Norbey Martinez 15.06.2017 в 19:09
source

1 answer

1

The situation has already been solved. I was not having the type of data

INSERT INTO ventas_saldos(
    f_inicial,
    f_final,
    c_almacen,
    sw_costo,
    sw_consulta,
    usuario,
    sw_genera_consulta,
    ts_creacion
) values (
    '15/06/2017',
    '15/06/2017',
    '7,1',
    0,
    0,
    'ct060901',
    1,
    curren't
);
    
answered by 15.06.2017 в 19:16