Focal Point
DELETE with SQL PASS-THRU

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9671038702

January 17, 2007, 11:24 AM
neuro
DELETE 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.


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
January 17, 2007, 11:58 AM
Tony A
Neuro,

Just use normal SQL syntax but remember to finish off with the TABLE FILE SQLOUT etc. otherwise the SQL will not be executed.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 17, 2007, 02:26 PM
BlueZone
As 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.


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music