[AccessD] Cross posted as got brain freeze

Stuart McLachlan stuart at lexacorp.com.pg
Thu Dec 13 01:19:23 CST 2018


Oh yes, also:

1. how many potential codes
2. Can you have location/code overlaps i.e. 10, 40 POTHOLE and  20,60 POTHOLE

On 13 Dec 2018 at 7:09, Paul Hartland via AccessD wrote:

> To all,
> 
> Hopefully I will start seeing some messages come through soon, I have
> a problem where I just know the answer should be pretty simple but
> seem to have brain freeze.  I have the following table (sorry for any
> wrapping etc)
> 
> SECTION START_POINT END_POINT DEFECT_CODE
> SecA         0.00                 100.00 RUT
> SecA         50.00         140.00 FAT
> SecA         10.00          20.00 POTHOLE
> SecA         60.00          70.00 POTHOLE
> 
> and I need to produce something like below
> 
> SECTION START_POINT END_POINT DEFECT_CODES_XML
> SecA         0.00                  10.00
> <DefectCodes>RUT</DefectCodes> SecA         10.00          20.00
> <DefectCodes>RUT,POTHOLE</DefectCodes> SecA         20.00         
> 50.00 <DefectCodes>RUT</DefectCodes> SecA         50.00          60.00
> <DefectCodes>RUT,FAT</DefectCodes> SecA         60.00          70.00
> <DefectCodes>RUT,POTHOLE,FAT</DefectCodes> SecA         70.00        
> 100.00 <DefectCodes>RUT,FAT</DefectCodes> SecA        100.00        
> 140.00 <DefectCodes>FAT</DefectCodes>
> 
> As you can see the start and end points can cross over etc, I think
> the main problem I am having is creating the start & end points from
> the initial four rows, any help greatly appreciated before I succumb
> to starting the Christmas spirit (whisky) earlier than I have
> anticipated.......
> 
> Many many many thanks and Christmas wishes to everyone for the help.
> 
> -- 
> Paul Hartland
> paul.hartland at googlemail.com
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list