Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a source table in which when an error occured, related error msg is stored in multiple rows. how can i store all msgs in single row/coulmn
Please find the attached sample application.
Hi Sushil
Use a concat in the load.
LOAD
BSN as bsn,
'Runtime_error_occured' as error,
concat(Measure,' ') as measure
RESIDENT source_table group by BSN;
See attached amended script in your qvw,
Hope this helps.
Derek
Hi Sushil
Use a concat in the load.
LOAD
BSN as bsn,
'Runtime_error_occured' as error,
concat(Measure,' ') as measure
RESIDENT source_table group by BSN;
See attached amended script in your qvw,
Hope this helps.
Derek
Hi Derek,
Thanks for you valuable reply,
It seems it is done correctly but in measure field error msgs are not concatenated in order.
they should be concatenated in order as given in the source table...
Please help me to sort out this issue.
Thanks
Sushil
OK, possibly slightly more complicated then.
You need to add a record count to your original table so it has a numeric value of the load order, from this you can the use this 'RecordNo' to fix the order of the concatenation.
Attached is your example with the required fix, however if you are bringing in the raw data from a text file/qvd etc, it's much easier than the script I've used as you won't need to create a temp table, you can simply just add RecNo() as RecordNo to the start of your load.
Hope this helps
Derek