Hi,
I have 2 tables with fields:
tbl_Question
Questin_ID,
Question,
Depends
tbl_Answer
Company_ID
Question_ID
Answer
I do not have Company_ID field in tbl_Question.
Data Example:Company-id,Question_id,Question,Answer,Depends
10, 1, Q1, A1
10, 2, Q2, A2, 1
10, 3, Q3, A3, 2
10, 4, Q4, A4, 2
10, 5, Q5, A5, 4
10, 6, Q6, A6,
This data shows Questions with dapendency, exp. Question2 -Q2 is under Question Q1 and Questions Q3, Q4, under Q2
So we have:
Q1
Q2
Q3
Q4
Q5
Q6
We have max, 4 Levels.
I need sp which will display
Q1, A1, , , , , ,
Q1, A1, Q2,A2 , , , ,
Q1,A1,Q2,A2,Q3,A3, , ,
Q1,A1,Q2,A2,Q4,A4, , ,
Q1,A1,Q2,A2,Q4,A4 ,Q5,A5,
Q6,A6, , , , , , ,
Please help if you can.
Best,
Marta
I have 2 tables with fields:
tbl_Question
Questin_ID,
Question,
Depends
tbl_Answer
Company_ID
Question_ID
Answer
I do not have Company_ID field in tbl_Question.
Data Example:Company-id,Question_id,Question,Answer,Depends
10, 1, Q1, A1
10, 2, Q2, A2, 1
10, 3, Q3, A3, 2
10, 4, Q4, A4, 2
10, 5, Q5, A5, 4
10, 6, Q6, A6,
This data shows Questions with dapendency, exp. Question2 -Q2 is under Question Q1 and Questions Q3, Q4, under Q2
So we have:
Q1
Q2
Q3
Q4
Q5
Q6
We have max, 4 Levels.
I need sp which will display
Q1, A1, , , , , ,
Q1, A1, Q2,A2 , , , ,
Q1,A1,Q2,A2,Q3,A3, , ,
Q1,A1,Q2,A2,Q4,A4, , ,
Q1,A1,Q2,A2,Q4,A4 ,Q5,A5,
Q6,A6, , , , , , ,
Please help if you can.
Best,
Marta