Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to create a field with multiple lines in the same row using load * inline.
For example
I want to create something like following:
I want to create the following log table
Row | Date | Shopping List |
---|---|---|
1 | 2016/01/01 | Started creating the application |
2 | 2016/01/02 | Added the following reports: - Customer Contact Listing - Sales Contact Listing - Sale Contact customer frequency |
3 | 2016/01/03 | Added the following dashboard - This Audit Log table to keep track the changes of the application - Customer Order report - Customer Revenue generated report |
Do you know how can I insert special characters like new line or tab into the report?
Thanks in advance.
or maybe using some replace, in the example @@ for newline; replace can be nested
Table:
LOAD F1,
F2,
replace(F3, '@@', chr(10)) as F3
INLINE [
F1, F2, F3
1, 2016/01/01, Started creating the application
2, 2016/01/02, Added the following reports: @@ - Customer Contact Listing @@ - Sales Contact Listing @@ - Sale Contact customer frequency
3, 2016/01/03, Added the following dashboard @@ - This Audit Log table to keep track the changes of the application @@ - Customer Order report @@ - Customer Revenue generated report
];
Try this:
Table:
LOAD F1,
F2,
Evaluate(F3) as F3
INLINE [
F1, F2, F3
1, 2016/01/01, "'Started creating the application'"
2, 2016/01/02, "'Added the following reports:' & Chr(10) & '- Customer Contact Listing' & Chr(10) & '- Sales Contact Listing' & Chr(10) & '- Sale Contact customer frequency'"
3, 2016/01/03, "'Added the following dashboard' & Chr(10) & '- This Audit Log table to keep track the changes of the application' & Chr(10) & '- Customer Order report' & Chr(10) & '- Customer Revenue generated report'"
];
or maybe using some replace, in the example @@ for newline; replace can be nested
Table:
LOAD F1,
F2,
replace(F3, '@@', chr(10)) as F3
INLINE [
F1, F2, F3
1, 2016/01/01, Started creating the application
2, 2016/01/02, Added the following reports: @@ - Customer Contact Listing @@ - Sales Contact Listing @@ - Sale Contact customer frequency
3, 2016/01/03, Added the following dashboard @@ - This Audit Log table to keep track the changes of the application @@ - Customer Order report @@ - Customer Revenue generated report
];
Sunny and Maxgro,
Thanks for all your response.
I tried both and both answer is correct. Maxgro, as your solution appears easier to use, I used your solution.
Thanks!
Sunny,
Your solution also inspired me how to solve my other problem in a better way.
A Big Thanks You to you!
Great, I am glad we were able to help you resolve your problem. In the process I learned a new technique of doing this from maxgro. So thanks to you and Maxgro as well