March 2, 2012 at 12:04 am
Hi Sir,
please help me.
Table
DateNameEmp_codeNumberTeam Leader
1/1/2012A12A
2/1/2012B23B
10/1/2012C345A
15/1/2012D46B
16/1/2012E57C
31/1/2012F68C
2/2/2012G79D
12/2/2012H810E
13/2/2012I911E
14/2/2012J1012J
result should be like this.
Week NameEmp_codeNumberTeam_leader
1 Jan 2012 to 5 Jan 2012A12A
1 Jan 2012 to 5 Jan 2012B23B
6 Jan 2012 to 12 Jan 2012 C390A
13 Jan 2012 to 19 Jan 2012 D46B
13 Jan 2012 to 19 Jan 2012 E57C
20 Jan 2012 to 26 Jan 2012
27 Jan 2012 to 31 Jan 2012 F68C
1 feb 2012 to 1 feb 2012
2 feb 2012 to 8 feb 2012 G79D
9 feb 2012 to 15 feb 2012H810E
9 feb 2012 to 15 feb 2012I911E
9 feb 2012 to 15 feb 2012J1012J
March 2, 2012 at 12:32 am
Can you please elaborate on what you wnat?
PLease read the following article on how to post your question http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 2, 2012 at 2:46 am
Hmmmm, seems very very similar to this question from a few days ago.
As in the last post I made on that thread, if the sample data and ddl can be provided as asked for by ColdCoffee, then I'm more than willing to edit the CLR I wrote to perform the solution.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply