sdhanpaul (10/22/2012)
Im doing it in sql server 2005...management studio expressI used the nested subquery method in ms access before and it was slow.
You need to post ddl ( create tables scripts), sample data (insert statements) and desired output based on your sample data.
I have no idea what the ddl is.
I posted the sample results and the desired results...
I'm not sure what else I need to post...
Sorry if i seem to be hard headed...
Have a look here for a random thread which includes DDL and INSERTs.
We need sample source data - not just the results.
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.