JDBC: Change the INSERT statement
Due to the fact that I'm using the JDBC connector to a Firebird database and that I don't have the ability to adjust the schema of the database, I have to work around the fact that the database doesn't have an auto incrementing key.
I've worked out how to do it, but I haven't worked out how to make the IDM Shim implement the statement I need to execute.
Right now it's executing this:
INSERT INTO MASTER(MST_FIRST_NAME, MST_LAST_NAME, MST_EMP) VALUES ('Test', 'Consultant', 'IDV0000001')
I need it to do this:
INSERT INTO MASTER(MST_SQ, MST_FIRST_NAME, MST_LAST_NAME, MST_EMP) VALUES((SELECT MAX(MST_SQ) + 1 FROM MASTER), 'Test', 'Consultant', 'IDV0000001')
Does anyone have an idea how I can do this?
|