I posted this yesterday and after a bit of discussion it wasnt resolved so any advice would be welcomed. I need a way to do the following I thought temp tables but cant see a way to generate them through ASP without using a sstored procedure.<BR><BR>I have four tables within my database as below <BR><BR>CcodesFirstOptions <BR> FirstoptionID &#124 FirstOption &#124 AssignedCode <BR>e.g. 1 &#124 Hardware &#124 16 <BR> 2 &#124 Software &#124 17 <BR><BR>CcodesSecondOptions <BR> SecondOptionID&#124 SecondOption&#124 AssignedCode&#124 FirstoptionID <BR>e.g. 1 &#124 Laptop &#124 AA &#124 1 <BR> 2 &#124 Desktop &#124 AB &#124 1 <BR> 3 &#124 MS Office &#124 AA &#124 2 <BR> 4 &#124 MS Project &#124 AB &#124 2 <BR><BR><BR>And so on and so fourth, each table being dependant on the one before. <BR><BR>Now I have a set of generated codes retreived from the log files as so: <BR><BR>16.AA.BB.CC <BR>17.AB.AB.AD <BR><BR>E.t.c. <BR><BR>What I am trying to do is come up with a way to first split the codes into their relevant sections I though <BR><BR>MyArray = Split(myRS, ".") <BR><BR>would do the trick. <BR><BR>Then I need to access the database to derive what the code means whilst maintaining a count of how many of each type of code there is so for instance I can report <BR><BR>Hardware Cases - 347 (60%) <BR>Software Cases - e.t.c. <BR><BR>and of course produce more detailed reports from the figures. <BR><BR><BR>