View Single Post
  #10 (permalink)  
Old May 7th, 2007, 04:59 PM
carswelljr carswelljr is offline
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

o.k this one query is driving me nuts. i got records to display but not the way i need them to. one of my buddies said that i cannot write this query with 1 statement that it has to be in 2 and loop. i got the 1st part to return records, count the records, but i cannot get it to count the issues and associate it with a color from the colortbl. help please

1). SELECT v.category, COUNT(v.category) AS issue_count
FROM TICKET_VIEW v
GROUP BY v.category
ORDER BY v.category

Then go through these results:

2) select color

from colortbl

where c.min_issues > $issue_count and c.max_issues <= $issue_count


Reply With Quote