What is Conditional DML? Can anyone please explain with example.

Showing Answers 1 - 4 of 4 Answers

Sachin

  • Sep 19th, 2006
 

The DML that is used as a condition is known as conditional DML..

Suppose we have data that includes the Header,Main data and Trailer as given below:

10 This data contains employee info.

20 emp_id,emp_name, salary

30 count

So, the DML for the above structure would be:

record

decimal (",") id;

if (id==10)

begin

string (",") info;

end

else if (id==20)

begin

string (",") emp_id;

string (",") name;

string (",") salary;

end

else if (id==30)

begin

decimal (",") count;

end

end;

This is

  Was this answer useful?  Yes

Mukund

  • Dec 7th, 2006
 

 Conditional dml ,is a DML which is separated based on a condition.

eg:Suppose ur DML have Header ,detail and Trailer parts,u need to separate these coz we need to have detailed part .

record

if (record_type == 0)

/*corresponding header information*/

end header;

if(record_type == 1)

/*corresponding detail information */

end detail;

if(record_type ==9)

/*corresponding trailer information*/

end trailer;

end;

here 0 corresponds to header,1 corresponds to detail and 9 corresponds to trailer.not only 0,1,9.we can use 000,111,999 or "H","D","T" etc depending upon ur convenience.

hope this might sooths u.

cheers,

mukund

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions