Hello,
Question about formatting my query results.
I have a customer table and a customer_phone table linked by customer_id field.
When I select records from customer_phone for a particular customer_id I get as many rows as the customer has phone numbers.
For example
select * from customer_phone where customer_id = 123;
Yeilds
Customer_Id Phone
123 123-345-4567
123 123-345-9987
123 123-345-2232
What I would like is to be able to collapse that to one result somehow but I do not have a clue.
so something like
Customer_Id Phone1 Phone2 Phone3
123 123-345-4567 123-345-9987 123-345-2232
Any thoughts would be appreciated.
Question about formatting my query results.
I have a customer table and a customer_phone table linked by customer_id field.
When I select records from customer_phone for a particular customer_id I get as many rows as the customer has phone numbers.
For example
select * from customer_phone where customer_id = 123;
Yeilds
Customer_Id Phone
123 123-345-4567
123 123-345-9987
123 123-345-2232
What I would like is to be able to collapse that to one result somehow but I do not have a clue.
so something like
Customer_Id Phone1 Phone2 Phone3
123 123-345-4567 123-345-9987 123-345-2232
Any thoughts would be appreciated.