need help with a query

need help with a query

 

  

Hi List,

I am getting the following result for a query I need

SVC_ORD _ID PROD_ID

234939 800

234939 712

789688 77

789688 249

970533 264

970533 768



Is there anyway I can get the result as 1-800 ,1-712

On the same service order say I have two products in this case is there
anyway I can write the query where I get a result as 1-800,2-77,2-249
instead of repeating the service order and the prod_id

TIA

MS Sql Server LazyDBA home page