Delete from teradata using BTEQ /MLOAD with parameters

Tools
Enthusiast

Delete from teradata using BTEQ /MLOAD with parameters

Hi All

I need to delete records from a table, I am using Informatica to indentify the records to be deleted I need to pass the the parameters to identify the records to be deleted

:In case of BTEQ if I store all of the key values in a text file and then pass the parameters (keys) to the where clause in bteq
Is it possible to combine general unix commads (CUT,READING FROM A FILE ETC... ) with the ctl of bteq

I am planing to read the text file in a loop and the execute the delete commadn in the bteq with the values in where clause obtained from the file being read

Is it possible to do this

Regards
2 REPLIES
Enthusiast

Re: Delete from teradata using BTEQ /MLOAD with parameters

There is an .OS command in BTEQ that would run the OS commands while you are running BTEQ for eg: .OS dir or .OS cls etc.,
See if you can use this command to acheive your goal. I hope it would help.

Regarding passing parameters to query from a file, I hope you can do this by USING clause construct.I suggest you to go through documentation for more information
Enthusiast

Re: Delete from teradata using BTEQ /MLOAD with parameters

May be I didn't get the Q right, but have you thought of just importing the contents of the text file into a temp table using bteq and doing a single DELETE using a join with that temp table ?