Brian Yudhanto
Brian Yudhanto

Reputation: 137

How to display two columns into one column with two lines?

I have some problem with my database query:

SELECT 
    a.survey_id,
    c.questions_first_language ||'-'|| c.questions_second_language as statements,
FROM survey a
    LEFT JOIN survey_questions b
        on a.survey_id = b.survey_id

How the column "statements" looks like this:

 ============================
 statements
 ============================
 | questions_first_language |
 | questions_second_language|
 |__________________________|
 | questions_third_language |
 | questions_fourth_language|
 |                          |
 ============================

Upvotes: 0

Views: 400

Answers (1)

Vao Tsun
Vao Tsun

Reputation: 51466

just in two lines? this?

SELECT 
a.survey_id,
c.questions_first_language ||chr(10)|| c.questions_second_language as statements,
FROM survey a
LEFT JOIN survey_questions b
on a.survey_id = b.survey_id

Upvotes: 1

Related Questions