Hi all,
Is a raw sql insert possible during a transaction?
Is there a standard way to do this? I've not found a good reference, particularly with Servoy.
Updating many records incurs a large penalty due to the updates to the foundset during the updates. Bulk update using raw sql would work best, but there always seem to be gotchas and examples are singular in nature. The examples usually show the base case, not casting or other potential issues.
I've attempted an insertion and get the following error. Removed the UUID and
Raw SQL message org.postgresql.util.PSQLException:
Can't infer the SQL type to use for an instance of com.servoy.j2db.util.UUID. Use setObject() with an explicit Types value to specify the type to use. Can't infer the SQL type to use for an instance of com.servoy.j2db.util.UUID. Use setObject() with an explicit Types value to specify the type to use.
sql query args [FS-53199859-D71F-11E5-8AFE-A292F4137E41,FS-546B3823-D71F-11E5-8AFE-A292F4137E41,B813A8C6-03A4-4659-9A3D-AE3C7F031BBE,1564947969533,1564947969000]
INSERT INTO import_guids (assem_guid,part_guid,import_table_id,edit_date,modification_date) VALUES (?,?,?,?,?)
Removing the GUID reference results in a different error:
Raw SQL message org.postgresql.util.PSQLException: ERROR: column "edit_date" is of type timestamp without time zone but expression is of type double precision
Hint: You will need to rewrite or cast the expression.
Position: 91 ERROR: column "edit_date" is of type timestamp without time zone but expression is of type double precision
Hint: You will need to rewrite or cast the expression.
Position: 91
sql query args [FS-53199859-D71F-11E5-8AFE-A292F4137E41,FS-546B3823-D71F-11E5-8AFE-A292F4137E41,1564948086436,1564948086000]
INSERT INTO import_guids (assem_guid,part_guid,edit_date,modification_date) VALUES (?,?,?,?)
thanks,
--Joe.