Sample Header Ad - 728x90

Convert Column multiple rows to single row output sql

0 votes
1 answer
332 views
I have an example query below that I am running that is only on one column, but multiple rows can be displayed: SELECT dbspace FROM tab_info_script WHERE database = 'dwh_vodac' AND tabname = 'ft_import_lock' Example output: dbspace2 dbspace4 idxdbs2 dbspace3 idxdbs3 dbspace1 dbspace5 My goal is try and convert the multiple rows into a single row output such as below: dbspace2 dbspace4 idxdbs2 dbspace3 idxdbs3 dbspace1 dbspace5 This is an informix database I am working with, but many examples I see online are for MySQL or SQLServer, which is very different. So basically I am only working with one column that can generate multiple rows, but instead of multiple rows I want the output to be one row. Is that possible?
Asked by Christopher Karsten (319 rep)
Dec 20, 2023, 01:45 PM
Last activity: Dec 20, 2023, 06:36 PM