-1

TeacherApprover Table - Table format in Database

TeacherID   ApproverID  ApproverLevel
15122                4                1
15122                2                2
15122                3                3

i need the result as in select Statement- it should display as below

TeacherID   ApproverID  ApproverID2`    ApproverID3
15122             4              2                3

i tried directly binding in front end but i have some issues after binding like this, So i want to try getting the result in Dataset directly from backend. please guide me

H H
  • 263,252
  • 30
  • 330
  • 514

1 Answers1

0

I think you need approver id by teacher Id.
So I think you can get data using query,

SELECT ApproverID  from table_name  where teacherID = 15122;

Then handle the result according to your requirement.

  1. Create new table having column as you needed.
  2. insert into that new table .
INSERT INTO table2
(column_name(s))
SELECT column_name(s)
FROM table1;
MrYo
  • 1,797
  • 3
  • 19
  • 33