Hi All,
The case is given below:
Microsoft SQL Server 2000 - 8.00.534 (Intel X86)
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 3)
I have a table populated with data from a different database (AS400).
This table does not have any keys. It has a field called textline and
lineno along with other fields.
The way table was populated in the old system is given below.
Serial LineNO TextLine
K29664 1 DESCRIPTION RECORD #1
K29664 2 LIGHTS NOT WORKING
K29664 3
K29664 4 DESCRIPTION RECORD #2
K29664 5 HARNESS BROKEN AT TOP OF CAB.
K29664 6
K29664 7 DESCRIPTION RECORD #3
K29664 8 REMOVED HEADLINER.
K29664 9 WIRING REINSTALLED HEADLINER. TEST RAN OK
K29665 1 DESCRIPTION RECORD #1
Similarly the records for other SerialNo were populated. Not all the
serial no has the same number of lineno (it varies from 1 to any
number). Look at the another serial no below.
K29665 1 DESCRIPTION RECORD #1
K29665 2 HYDROLIC TANK LEAKING
I do not know why the table was populated in this way. All I know is
that I will have to get a single record out of this condition with
appending the textline field into one.
My question is how can I write a query so that I can append the
description of textline field into one desctiption for each serialno
field.
I do appreciate your help.
I thank you very much in advance.
Best Regards,
mamun