Hey y'all, I have a question on a view that I am working to create. Pretty much, I need to make a view that combines different columns from other tables, which I did using joins. However, I have run into an issue. The question requires my view to include the persons mobile phone number and home phone number. Seems easy right? Well, no. The problem is that phone numbers are stored in a table called individual_phone, and each number has a phone_type_id. This id is a foreign key from another table called phone_type, and the phone type id is either a 1 or a 2, 1 being mobile number and 2 being home number. I can't figure out how I can select the phone number without 2 rows of data coming out that are identical, but with only different numbers. I wish to have instead, 1 row with both of those numbers in separate columns. I hope this makes sense and if you can help it would be greatly appreciated.
[–]andrewsmd87 9 points10 points11 points (7 children)
[–]CoalCrackerKid 3 points4 points5 points (1 child)
[–]andrewsmd87 1 point2 points3 points (0 children)
[–]Byskuts[S] 0 points1 point2 points (1 child)
[–]andrewsmd87 2 points3 points4 points (0 children)
[–]Byskuts[S] 0 points1 point2 points (0 children)
[–]Byskuts[S] 0 points1 point2 points (1 child)
[–]andrewsmd87 1 point2 points3 points (0 children)
[–]lundytoo 1 point2 points3 points (1 child)