Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to create an inline table with carriage returns in the data?

I need to manipulate some data from our ERP system but am struggling.

For each sales order there can be more than one question and answer.

QandA:

LOAD * INLINE [

Order, Seq, Question, Answer

SO1, 1, What is your name?, Simon

SO1, 2, What is your favourite colour?, Blue

];

I only want to see one line per sales order, with all it's answers and questions.

QandA_v2:

LOAD * INLINE [

Order, Questions(s), Answers(s)

SO1,"What is your name?" & chr(10) & chr(13) & "What is your favourite colour?", "Simon" & chr(10) & chr(13) & "blue"

];

The above will not work as the chr(10) chr(13) are just seen as new rows.

Is there any way I can create a table with carriage returns in the data?

Regards

Mark

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

Something like this?


QandA:
LOAD * INLINE [
Order, Seq, Question, Answer
SO1, 1, What is your name?, Simon
SO1, 2, What is your favourite colour?, Blue
];
FinalQ_A:
LOAD Order,
concat(Question & ':' & Answer, chr(10), Seq) as QandA
RESIDENT QandA
GROUP BY Order;
Drop table QandA;


View solution in original post

4 Replies
Not applicable
Author

What is the business logic for such data? How are you going to use it for BI analysis?

disqr_rm
Partner - Specialist III
Partner - Specialist III

Something like this?


QandA:
LOAD * INLINE [
Order, Seq, Question, Answer
SO1, 1, What is your name?, Simon
SO1, 2, What is your favourite colour?, Blue
];
FinalQ_A:
LOAD Order,
concat(Question & ':' & Answer, chr(10), Seq) as QandA
RESIDENT QandA
GROUP BY Order;
Drop table QandA;


Not applicable
Author

Exactly what I needed thanks, seems so simple now Geeked

Not applicable
Author

There is none. The customers export this particular chart to excel and email it to colleague who do not have Qlikview. They want to see all the data at order level.