Use concat and maintain length of variable
- by user1682055
I'm trying to use concat on some variables. These variables have been declared as chars:
declare v_order_date char(10);
declare v_quantity char(11);
declare v_plant char(100);
I have a cursor where I am setting these as some outputs. To call the results, I am setting v_msg as
set v_msg := concat( v_msg, '\n', v_order_date, v_quantity, v_plant);
However, the result I am getting when I select v_msg is:
2012-01-222501008 Creeping Buttercup
but I want to maintain the length of the declared variables in my select that looks like this
2012-01-22 250 1008 Creeping Buttercup
Are there any suggestions? Thank you.