Question
Help with SQL
Hello,
I would like to join three tables into a single query instead of what I'm currently doing, which is running the first query on my main table and then doing a CFOUTPUT with its results on two sub tables. This doesn't look efficient
because if the main table has a 1000 records it will run the sub tables a 1000 times also. I've attached my code. Maybe I could do some sort of a join, but am not sure how to proceed. Here's my code:
I would like to join three tables into a single query instead of what I'm currently doing, which is running the first query on my main table and then doing a CFOUTPUT with its results on two sub tables. This doesn't look efficient
because if the main table has a 1000 records it will run the sub tables a 1000 times also. I've attached my code. Maybe I could do some sort of a join, but am not sure how to proceed. Here's my code:
