Rowan (phantomtoe@yahoo.com) writes:
> Sorry, I didn't include any sample data. I think this should do it.
Thsnks for the sample data, but I still don't know what the desired output
is. The output I got from the query you posted (where I had to change
some names to make it compile, and remove CustomerID) was:
10111 O 210 bl2 410 hbl2 NULL NULL
10111 O 210 bl2 430 hbl4 36 C16666666
10222 O NULL NULL 400 hbl1 33 C13333333
10222 O NULL NULL 400 hbl1 34 C14444444
10222 O NULL NULL 400 hbl1 35 C15555555
10333 X NULL NULL NULL NULL NULL NULL
10444 O NULL NULL 420 hbl3 NULL NULL
NULL NULL 200 bl1 NULL NULL NULL NULL
NULL NULL 220 bl2 NULL NULL NULL NULL
--
Erland Sommarskog, SQL Server MVP,
sommar@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp