Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-Nov-2009, 09:10 AM
Member
 
Join Date: Feb 2008
Location: Cape Town, South Africa
Posts: 86
preycor 0 reputation points
Default 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?
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 01:54 PM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2