Reputation: 177
In my Table sales_order_address there is 2 rows on each order, 1 record for billing to information and 2 is shipping to information. But I want to get billing and shipping address in column and single row.
You can see in screenshot Veronica6146 Honey Bluff ParkwayCaldershipping Veronica6146 Honey Bluff ParkwayCalderbilling in 2 rows how can I get into 1 column of a single row?
Upvotes: 1
Views: 34
Reputation: 37473
use group_concat()
select order_id,group_concat(concat(first_name, street,city,address_type))
from tablename
group by order_id
Upvotes: 1