January 17, 2007, 11:24 AM
neuroDELETE with SQL PASS-THRU
I know this can be done through maintain, however, I am looking for a SQL PASS-THRU that will allow me to delete records form a database table that is writable.
January 17, 2007, 11:58 AM
Tony ANeuro,
Just use normal SQL syntax but remember to finish off with the TABLE FILE SQLOUT etc. otherwise the SQL will not be executed.
T
January 17, 2007, 02:26 PM
BlueZoneAs long as the executor-id has sufficient DB2 permissions neuro, you should be able to use SQL-passthru to do just about anything that SQL has to offer. The following worked well for us before -
SQL DB2
INSERT INTO DB1.TBL1
SELECT FLD1,FLD2 FROM
(SELECT FLD1,FLD2 FROM DB1.TBL2
WHERE FLD3 IN (1,2,3)
)
;
TABLE
ON TABLE HOLD AS HXX1
END
-RUN
-*
-*
Hope that helps,
Sandeep.