Hello,
I am having a problem with this code:
Here is what i am trying to achieve:
The values in D06_04 and D06_05 are related to the Value in D06_01
the values in D08_01 thru D08_10 are also related to the value in D06_01
Here is the set structure:
Vehinfo
|
|____________Vehpersonnel
|____________VehMileage
I have uploaded the database for examination..
thanks for all the help.. Without the excellent help i could never accomplish what i have done so far...
I am having a problem with this code:
Code:
veh_tbl = table.open("vehinfo") veh_tbl.fetch_first() first_Unitvehicilenumber = veh_tbl.Unitvehicilenumber WHILE .not. veh_tbl.fetch_eof() fil.write_line(" <D06 Status =\"A\"" " Date="+time("\"yyyy-MM-dd\"")+">") fil.write_line(" <D06_01>"+alltrim(veh_tbl.Unitvehicilenumber)+"</D06_01>") WHILE veh_tbl.Unitvehicilenumber = first_Unitvehicilenumber .and. .not. veh_tbl.fetch_eof() fil.write_line(" <D06_03>"+alltrim(veh_tbl.D06_03)+"</D06_03>") veh_tbl.fetch_next() end while fil.write_line(" <D06_04_0>") first_Unitvehicilenumber = veh_tbl.Unitvehicilenumber End While veh_tbl.close() vep_tbl = table.open("vehpersonnel") vep_tbl.fetch_first() first_Unitvehicilenumber = vep_tbl.Unitvehicilenumber fil.write_line(" <D06_04>"+alltrim(vep_tbl.D06_04)+"</D06_04>") fil.write_line(" <D06_05>"+alltrim(vep_tbl.Numberofpersonnel)+"</D06_05>") WHILE vep_tbl.Unitvehicilenumber = first_Unitvehicilenumber .and. .not. vep_tbl.fetch_eof() vep_tbl.fetch_next() end while fil.write_line(" </D06_04_0>") first_Unitvehicilenumber = vep_tbl.Unitvehicilenumber vep_tbl.close()
Here is what i am trying to achieve:
Code:
<D06 Status="A" Date="2009-07-09"> <D06_01>Vehicle 1</D06_01> <D06_03>7370</D06_03> <D06_04_0> <D06_04>9990</D06_04> <D06_05>2</D06_05> </D06_04_0> <D06_04_0> <D06_04>9991</D06_04> <D06_05>2</D06_05> </D06_04_0> <D06_06>2</D06_06> <D06_07>2006</D06_07> <D06_08_0> <D06_08>2006</D06_08> <D06_09>-5</D06_09> <D06_10>-5</D06_10> </D06_08_0> <D06_08_0> <D06_08>2006</D06_08> <D06_09>-5</D06_09> <D06_10>-5</D06_10> </D06_08_0> </D06> <D06 Status="A" Date="2009-07-09"> <D06_01>Vehicle 2</D06_01> <D06_03>7370</D06_03> <D06_04_0> <D06_04>5432</D06_04> <D06_05>2</D06_05> </D06_04_0> <D06_04_0> <D06_04>9876</D06_04> <D06_05>2</D06_05> </D06_04_0> <D06_06>2</D06_06> <D06_07>2006</D06_07> <D06_08_0> <D06_08>2006</D06_08> <D06_09>-5</D06_09> <D06_10>-5</D06_10> </D06_08_0> <D06_08_0> <D06_08>2006</D06_08> <D06_09>-5</D06_09> <D06_10>-5</D06_10> </D06_08_0> </D06>
The values in D06_04 and D06_05 are related to the Value in D06_01
the values in D08_01 thru D08_10 are also related to the value in D06_01
Here is the set structure:
Vehinfo
|
|____________Vehpersonnel
|____________VehMileage
I have uploaded the database for examination..
thanks for all the help.. Without the excellent help i could never accomplish what i have done so far...
Comment