What should be the Before clause in Teradata Mload?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 41
- Joined: Sat Jun 06, 2009 11:13 pm
- Location: Kolkata
What should be the Before clause in Teradata Mload?
I am currently trying to insert data into Teradata Mload table. It's working fine. But what should be the BEFORE CLAUSE that can be used so that the table may be truncated or deleted or released before it starts processing?
Can anybody help me with the list of commands that will be applicable in the BEFORE (M)LOAD CLAUSE?
Can anybody help me with the list of commands that will be applicable in the BEFORE (M)LOAD CLAUSE?
Nayan
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: What should be the Before clause in Teradata Mload?
The correct command to clear that particular table.nayanpatra wrote:I am currently trying to insert data into Teradata Mload table. It's working fine. But what should be the BEFORE CLAUSE that can be used so that the table may be truncated or deleted or released before it starts processing?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 41
- Joined: Sat Jun 06, 2009 11:13 pm
- Location: Kolkata
Example
Is there any particular syntax for it? Could you please give me some examples?keshav0307 wrote:any DML
Nayan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's a Teradata command, not a DataStage command. Because we don't know all the identifier names in your Teradata installation, we can not help. Ask your database administrator (DBA) for assistance on Teradata command syntax.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 41
- Joined: Sat Jun 06, 2009 11:13 pm
- Location: Kolkata
Identifier names of my Teradata installation
I checked with the DBA. Actually I want to delete the Teradata tables before inserting data into them. Some of the installed queries applicable are delete, drop, release. But there is no identifier for truncate. So to be precise how am I going to use the delete syntax.ray.wurlod wrote:It's a Teradata command, not a DataStage command. Because we don't know all the identifier names in your Teradata installation, we can not help. Ask your database administrator (DBA) for assistance ...
I have already tried with the delete command. But hasn't worked. I suppose there is a particular syntax for it. Could you please help me with the right syntax?
Nayan
Apart from checking two options ( one to Drop error tables and second to treat SQL errors as non fatals) use below commandhamzaqk wrote:it should generate the drop statement itself for all the tables your specifying for Mload........ for the before command we usually check the two options specified in datastage in the before tab.
in before --script in TD Mload stage.
delete from <DATABASE_NAME>.<TABLE_NAME> all;
This has worked for us to delete the table before load by using mload stage(script).
Again if you need the stats of records went to error table then dont check -Drop error tables option.
Shiva