|  | Posted by Generale Cluster on 05/04/06 16:46 
Hello,I have a table "log" with the following fields:
 
 -log_id		(int)
 -cust_id	(string)
 -type		(int)
 -service_id	(int)
 
 type may be 0,1 or 10
 
 I need to fetch one row for each type for each service_id for a specific
 cust_id.
 That is, if  I have 3 different service_id's and I assume that at least
 one row for each type exists with the specific cust_id, I should get 3*3
 = 9 rows: no more, no less.
 I prefer not to use a stored procedure.
 How may I do?
 Is a self-join the right way?
 
 Thank you
 Regards
 
 
 --
 elimina carraro per rispondere via email
  Navigation: [Reply to this message] |