SQL/MX Insert With Timestamp

411 Views Asked by At

Does anyone know how to insert with a timestamp this is on an HP Tandem SQL/MX system. I HAVE SEEN THE FUNCTION CURRENT_TIMESTAMP BUT IT COMES BACK WITH AN ERROR.

insert into =BOXTABLE
values (71,'A',1,CURRENT_TIMESTAMP,'123456');

Example:

>>BEGIN WORK; 
>>insert into =BOXINSTANT 
+>values 
+>(71,'A',1,CURRENT_TIMESTAMP,' 174520870009');

*** ERROR from SQL [-4089]: The value list of the INSERT statement cannot reference a column. ***

1

There are 1 best solutions below

0
On

I am not that familiar with SQLMX but a typical sql statement requires you to list the fields and then the values as such:

Insert Into BOXTABLE ('Fieldname1', 'Fieldname2','Fieldname3','Fieldname4')
Values (71,'A',1,CURRENT_TIMESTAMP,'123456');

https://msdn.microsoft.com/en-us/library/aa977880(v=vs.71).aspx