hi,
I have a SQL query that is returning me the correct output. It returns employee and dependent data. dependent record is tied to the employee. so if an employee has 2 dependents (spouse and child), then it returns 3 rows (employee id being the primary key)..Now if I want the output to be displayed as one row per employee, is there a way I can format this in excel ? the sql output currently returns about 23k rows, but it is row-wise. As an example, for employees E1 and E2 the output currently shows as below:
E1
S1
C1
E2
S2
C2
where S1,C1 are spouse and child of E1 respectively & S2,C2 are spouse and child of E2 respectively.
and I require it to be shown one row per employee with dependents
E1 record with S1 AND C1
E2 record with S2 AND C2
Appreciate if anyone knows what formatting I can do in excel to achieve this.
Thanks
I have a SQL query that is returning me the correct output. It returns employee and dependent data. dependent record is tied to the employee. so if an employee has 2 dependents (spouse and child), then it returns 3 rows (employee id being the primary key)..Now if I want the output to be displayed as one row per employee, is there a way I can format this in excel ? the sql output currently returns about 23k rows, but it is row-wise. As an example, for employees E1 and E2 the output currently shows as below:
E1
S1
C1
E2
S2
C2
where S1,C1 are spouse and child of E1 respectively & S2,C2 are spouse and child of E2 respectively.
and I require it to be shown one row per employee with dependents
E1 record with S1 AND C1
E2 record with S2 AND C2
Appreciate if anyone knows what formatting I can do in excel to achieve this.
Thanks
Last edited: