Pattycake245
Programmer
I have an interesting problem that I have an answer to but it takes 30 seconds to run. I have a table with records in it something like:
empid queue itemnum
1234 att 0913403
2356 comp 0913430
1234 comp 0913430....
I also have a table with all possible queue's in it, 15 to be exact. I'm trying to get the counts of each queue per empid per itemnum, and also show all queue's even if they have a count of 0. I am doing an inner select for each queue which is why it takes so long to run. I want to do this one line per empid. Something like...
empid compl att queue3 queue4 queue5...
1234 2 1 0 0 0
This is for displaying on a web page. If someone had an idea for a quicker workaround that would be a great help. I can't seem to get the join syntax working the way I want it. Hopefully this makes sense.
thanks in advance, Tim
empid queue itemnum
1234 att 0913403
2356 comp 0913430
1234 comp 0913430....
I also have a table with all possible queue's in it, 15 to be exact. I'm trying to get the counts of each queue per empid per itemnum, and also show all queue's even if they have a count of 0. I am doing an inner select for each queue which is why it takes so long to run. I want to do this one line per empid. Something like...
empid compl att queue3 queue4 queue5...
1234 2 1 0 0 0
This is for displaying on a web page. If someone had an idea for a quicker workaround that would be a great help. I can't seem to get the join syntax working the way I want it. Hopefully this makes sense.
thanks in advance, Tim