Hi,
Have a table that I need to INSERT INTO. One field (TRANSACTION_ID)needs to be unique and incremented so this
sql works perfectly to come up with that new value.
SELECT (Max(SYSADM_LABOR_TICKET.TRANSACTION_ID) +1) AS expmax FROM SYSADM_LABOR_TICKET;
The problem is that you get a reserved error (-3025)when trying to put this into an insert query.
INSERT INTO SYSADM_LABOR_TICKET (TRANSACTION_ID)
SELECT (SELECT(Max(SYSADM_LABOR_TICKET.TRANSACTION_ID) +1) AS expmax FROM SYSADM_LABOR_TICKET
Is there a work-around for this ? Many thanks, Steve.
Have a table that I need to INSERT INTO. One field (TRANSACTION_ID)needs to be unique and incremented so this
sql works perfectly to come up with that new value.
SELECT (Max(SYSADM_LABOR_TICKET.TRANSACTION_ID) +1) AS expmax FROM SYSADM_LABOR_TICKET;
The problem is that you get a reserved error (-3025)when trying to put this into an insert query.
INSERT INTO SYSADM_LABOR_TICKET (TRANSACTION_ID)
SELECT (SELECT(Max(SYSADM_LABOR_TICKET.TRANSACTION_ID) +1) AS expmax FROM SYSADM_LABOR_TICKET
Is there a work-around for this ? Many thanks, Steve.