I need to create a flat file for import into a 3rd-party application. The format of the data versus the table structure of the source is driving me crazy.
Table structure example:
Site BR Tx
ABC 11 8526750
ABC 12 8526850
ABC 12 8526855
ABC 13 8526950
DEF 11 8526850
DEF 12 8526750
DEF 13 8526855
The file I need to generate would look like:
Site TxList
ABC 8526750;8526850;8526855;8526950
DEF 8526850;8526750;8526855
It has to be in that format (semi-colon seperated list in one field, one line per site). There are actually more fields required, but I've got everything else covered except this part.
There can be anywhere from 2-20 rows of data for each site in the source data. There are 2-3 thousand sites.
I am using SQL Server 2000.
Table structure example:
Site BR Tx
ABC 11 8526750
ABC 12 8526850
ABC 12 8526855
ABC 13 8526950
DEF 11 8526850
DEF 12 8526750
DEF 13 8526855
The file I need to generate would look like:
Site TxList
ABC 8526750;8526850;8526855;8526950
DEF 8526850;8526750;8526855
It has to be in that format (semi-colon seperated list in one field, one line per site). There are actually more fields required, but I've got everything else covered except this part.
There can be anywhere from 2-20 rows of data for each site in the source data. There are 2-3 thousand sites.
I am using SQL Server 2000.