select * from Table1 where Condition 1 union select select * from Table1 where Condition 2 RESULTS:
NAME AMOUNT TYPE ABC -- Account ABC 200 -- but i need the results in one row like
NAME AMOUNT TYPE ABC 200 ACCOUNT How to do in PG?
I've achieved something like that with the following:
select TABLE_1.DESCRIPTION_COLUMN, (array(select TABLE_2.INFO_COLUMN from TABLE_2 where TABLE_1.ID = TABLE_2.ID_TABLE_1))[1], (array(select TABLE_2.INFO_COLUMN from TABLE_2 where TABLE_1.ID = TABLE_2.ID_TABLE_1))[2] from TABLE_1 WHERE TABLE_1 = 1 Source/Help:
JOINnot aUNION