mardi 8 septembre 2015

What script would concatenate strings and filter by column value?

I need a script that will concatenate the Reason values by PLAN_ID in a colon delimited string from the following table and place them in a further table, staying true to the Order value. How can this be achieved?

PLAN_ID Order   Reason
6281    1       Declined
6281    4       Unfit
6281    8       Other
6281    9       Monitoring
6286    1       Declined
6286    5       Unknown Site
6286    10      Not Known

PLAN_ID Reason
6281    Declined;Unfit;Other;Monitoring
6286    Declined;Unknown Site;Not Known

Aucun commentaire:

Enregistrer un commentaire