All Forums Database
Jigar 70 posts Joined 09/11
06 Jan 2012
Tpump Del Issue

Hi All ,

I am trying a very simple tpump del script which just deletes data for previous day .However it is giving me an error saying APPLY command is not recognied .I am not sure how to call a DML label once it is created.I tried following commented syntaxes but it did not work.


Can someone help me with correct syntax.





/* DEL_TGT; */


/* .DEL_TGT */



Jigar 70 posts Joined 09/11
06 Jan 2012

Is it neccessary to use file in tpump operations ?

Jim Chapman 449 posts Joined 09/04
06 Jan 2012

APPLY is not a TPUMP command; it is an argument of the .IMPORT commmand. 

Since your DELETE statement does not reference any variables from an import file, it is not an appropriate application of TPUMP. You can submit it as regular SQL via BTEQ.

Jigar 70 posts Joined 09/11
06 Jan 2012

Actually its Real time data warehouse and we wanted table to be up 100% so we were looking at tpump to use row level lock and delete data.

I later tried passing an argument via file but for some reason it is not able to read the file and gies an error saying

'Access module error '35' received during 'read' operation
     on record number '0': 'EOF encountered before end of record'

File just has 1 valuews  which is 1




Jimm 298 posts Joined 09/07
06 Jan 2012

If you want to use row level locking, you will have to create a file of the primary keys of the records to be deleted and import that file into TPUMP. The delete will then be

.DML DelRecs;

Delete from tbl Where primarykey = :primarykey;

.IMPORT INFILE infile.dat





You must sign in to leave a comment.