Hi all,
I'm trying to create a layout of our website for Marketing to review,
and though I know how I want it presented, I'm not sure how to write
the SQL code to make it work. Here's a sample of the View I've written
with all our content:
Level Title ID ParentID
1 Clinics 1
1 Services 2
2 Surgery 1 2
2 ER 2 2
2 Radiology 3 2
2 Clinic 1 4 1
2 Clinic 2 5 1
2 Clinic 3 6 1
3 Heart 1 1
3 Lung 2 1
3 Physicians 3 4
3 Physicians 4 5
3 Physicians 5 6
And the output would basically be this:
Clinics
- Clinic 1
-- Physicians
- Clinic 2
-- Physicians
- Clinic 3
-- Physicians
Services
- Surgery
-- Heart
-- Lung
- ER
- Radilogy
Is there anyway to do this in a SQL statement, or maybe Crystal or
Access? I even tried a Pivot table in Excel, but it wants to sum
stuff, and I'm not working with numbers (sums, counts, etc). Also
since I'm not using any aggrate functions MS SQL is complaining when i
use Group By.
Thanks for any suggestions. Also though the layout is similar, the
items listed above are pulled outta the air. Hopefully I typed up
something that makes since :)
Alex