OK, first off I would have written these queries completely different from the beginning but I didnt write the original code, and the front end interface is so complex that id rather retro-fit the query if i can, it would save a lot of time. I know it will end up sloppy but I have no choice.
We have this ASP page, pulls up 30 records, but instead of doing a join group by the programmer opened the first recordset and then called the database again for each record to get a subset of records, of course, this is a huge performance hit, because this page can have up to 150 independent calls to the DB server. But hes long gone and i am told to make this page work fast, and a total rewrite is out of the question, believe me I tried convincing them.
Anyways, what i need to do is get a subquery to pull a single column of no more than 5 records from another table and put them into a single varchar field of the parent record seperated by a comma. Is this possibe?
Thanks in advance
We have this ASP page, pulls up 30 records, but instead of doing a join group by the programmer opened the first recordset and then called the database again for each record to get a subset of records, of course, this is a huge performance hit, because this page can have up to 150 independent calls to the DB server. But hes long gone and i am told to make this page work fast, and a total rewrite is out of the question, believe me I tried convincing them.
Anyways, what i need to do is get a subquery to pull a single column of no more than 5 records from another table and put them into a single varchar field of the parent record seperated by a comma. Is this possibe?
Thanks in advance