petermeachem
Programmer
I've got two tables. DeliveryNotes contains OrderEntryID and DeliveryNote, and Orders also contains OrderEntryId and DisplayDeliveryNotes (it's a temp table). OrderEntryId is unique in Orders, in the other table there can be around 5 to 10 DeliveryNote per OrderEntryId. I need to string together the DeliveryNote from DeliveryNotes and put them into DisplayDeliveryNotes in Orders against the relevant OrderEntryId. It's being done as a recordset loop in vb at the moment which works ok, but takes too long and dumps a lot of data across the network.
I can't figure out how to do this as a stored procedure. Could someone point me in the right direction please.
Example
DeliveryNotes
1 Del1a
2 Del2a
2 Del2b
4 Del4a
I need to end up in Orders with
1 Del1a
2 Del2a , Del2b
3
4 Del4a
I can't figure out how to do this as a stored procedure. Could someone point me in the right direction please.
Example
DeliveryNotes
1 Del1a
2 Del2a
2 Del2b
4 Del4a
I need to end up in Orders with
1 Del1a
2 Del2a , Del2b
3
4 Del4a