I need to create a trigger on a table T1 on INSERT. The table has keys req_key and eq_key.
The trigger needs to SELECT equipment for a given req_key and eq_key and string concatenated them as one long string.
Eg: req_key=1001 and eq_key=10,11,12, The results for this select will be
1001 10 Motor
1001 11 Gear
1001 12 Brake
The trigger logic should convert this as 1001 10 Motor-Gear-Brake.
How do I do this?