I have several tables normalized around one table - like so:
Clinic data table (Address, Phone, Fax, etc.)
Services offered - clinicID, serviceText
Staff - clinicID, userID
Essentially what I need to do is return a dataset like so:
ClinicID | Address | ... | service1 | service2 | service3 | service4 | service5 | service6 | staff1 | staff2 | staff3 | staff4 | staff5
If there are fewer than 6 services, 5 staff, etc. for a clinic, the remaining columns should return null. If there are more, they should be left out.
Start Free Trial