Hi everyone,
I am using datarepeater on my windows form to populate records from a temp table. I want to write query to insert records for an employee in a single row rather than multiple rows. For example:
I am displaying records of one month only. so i know the definite number of columns.
Normally if we use select * from Temp ' it will display and i can populate in a datagrid.
EMPID-------DATE-------TotalHrs
--------------------------------
001------01/01/2010------10:00
001------01/02/2010------08:00
001------01/03/2010------09:00
002------01/01/2010------11:00
002------01/02/2010------07:00
002------01/03/2010------06:00
BUT TO DISPLAY THE DATA IN DATAREPEATER IT SHOULD BE LIKE THIS SINCE IT DISPLAYS RECORDS IN A SINGLE ROW:
EMPID----DATE1----TotalHrs1----DATE2----TotalHrs2----DATE3---TotalHrs3
--------------------------------------------------------------------------
001------1/1/2010-----10:00------1/2/2010-----08:00------1/3/2010-----09:00
002------1/1/2010-----11:00------1/2/2010-----07:00------1/3/2010-----06:00
I can achieve this with reprots but i have to use the datarepeater control.
Can anyone help me with the query..
Thanx and Cheers
irfi
I am using datarepeater on my windows form to populate records from a temp table. I want to write query to insert records for an employee in a single row rather than multiple rows. For example:
I am displaying records of one month only. so i know the definite number of columns.
Normally if we use select * from Temp ' it will display and i can populate in a datagrid.
EMPID-------DATE-------TotalHrs
--------------------------------
001------01/01/2010------10:00
001------01/02/2010------08:00
001------01/03/2010------09:00
002------01/01/2010------11:00
002------01/02/2010------07:00
002------01/03/2010------06:00
BUT TO DISPLAY THE DATA IN DATAREPEATER IT SHOULD BE LIKE THIS SINCE IT DISPLAYS RECORDS IN A SINGLE ROW:
EMPID----DATE1----TotalHrs1----DATE2----TotalHrs2----DATE3---TotalHrs3
--------------------------------------------------------------------------
001------1/1/2010-----10:00------1/2/2010-----08:00------1/3/2010-----09:00
002------1/1/2010-----11:00------1/2/2010-----07:00------1/3/2010-----06:00
I can achieve this with reprots but i have to use the datarepeater control.
Can anyone help me with the query..
Thanx and Cheers
irfi
Last edited: