I have sample data:
( * ) is not part of the primary key. Please see the below question.
-----------------------------------------------------------
ForeignKey Primary Key Description Code
1059645 *2.009423171 anothername1 thecode1
1059646 *2.009423171 anothername2 thecode2
1059647 *2.009423171 anothername3 thecode3
1061545 2.010670619 justaname anothercode
1061076 2.011974757 Name1 Code_a
1061077 2.011974757 Name2 Code_b
1061605 2.014092249 anothername anothercode
1060857 2.014271366 Name1 code_a
1060858 2.014271366 Name2 code_b
1061764 2.014436999 name misccode
1061488 2.014831398 name misccode
1061325 2.015730148 Name1 code_b
1061326 2.015730148 Name2 code_a
-----------------------------------------------------------
I have a child table storing eight codes/descriptions related to one master record. The master record could have 0 - 8 codes depending on the data imported. For reporting porposed, how do I get the recordset formatted as follows:
foreignkey,primarykey1,primarykey2...primarykey8
---------------------------- OR -----------------
2.009423171,1059645,105946,1059647
------------------------- or even better how too...
2.009423171,anothername1,anothername2,anothername3
... I am using a SQL/Server 2000 database. Please let me know if you need more information.
( * ) is not part of the primary key. Please see the below question.
-----------------------------------------------------------
ForeignKey Primary Key Description Code
1059645 *2.009423171 anothername1 thecode1
1059646 *2.009423171 anothername2 thecode2
1059647 *2.009423171 anothername3 thecode3
1061545 2.010670619 justaname anothercode
1061076 2.011974757 Name1 Code_a
1061077 2.011974757 Name2 Code_b
1061605 2.014092249 anothername anothercode
1060857 2.014271366 Name1 code_a
1060858 2.014271366 Name2 code_b
1061764 2.014436999 name misccode
1061488 2.014831398 name misccode
1061325 2.015730148 Name1 code_b
1061326 2.015730148 Name2 code_a
-----------------------------------------------------------
I have a child table storing eight codes/descriptions related to one master record. The master record could have 0 - 8 codes depending on the data imported. For reporting porposed, how do I get the recordset formatted as follows:
foreignkey,primarykey1,primarykey2...primarykey8
---------------------------- OR -----------------
2.009423171,1059645,105946,1059647
------------------------- or even better how too...
2.009423171,anothername1,anothername2,anothername3
... I am using a SQL/Server 2000 database. Please let me know if you need more information.