June 23, 2010 at 3:26 pm
please help me
below is the source table
new proj id old proj id
1084d 1084/
1084e 1084a
1084f 1084b
1077a 1077/
1077b 1077a
2134a 2134/
2134b 2134a
and the desired target is:
new proj id old proj id
1084d 1084/
1084e 1084a
1084f 1084b
1077b 1077/
1077b 1077a
1077b 1077b
2134b 2134/
2134b 2134a
2134b 2134b
June 23, 2010 at 4:36 pm
Please provide table def and sample data in a ready to use format together with your expected result and what you've tried so far. For details on how to post sample data please see the first link in my signature.
A short description of the business case (What are you trying to do?) would also be helpful.
June 23, 2010 at 6:14 pm
the table have new project ids and old project id as in like proj id 1A is transfered to proj id 1b also the proj id 1b is transferd to 1C and in few cases where in proj id 2A is transferd to 3B and few cases where in proj id 2A is transferd to 2D
the source table will look like
new proj id old proj id
1077A 1077/
1077B 1077A
1077C 1077B---(in this case 1077/ is got transfered multiple times first 1077A then 1077B..)
1084D 1084/
1084E 1084A------(in this eg 1084A is one time transfered to 1084E unlike 1077 case)
1084F 1084B
2034A 3034/
desired target table should be like
new proj id old proj id
1077C 1077/
1077C 1077A
1077C 1077B
1077C 1077C
1084D 1084/
1084E 1084A
1084F 1084B
2034A 3034/
please let me know if it is not clear
June 23, 2010 at 7:05 pm
There's nothing there to guarantee the order of the rows and that's one of the many reasons why Lutz requested that you post the data according to the article he cited.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 23, 2010 at 7:35 pm
Actually, this is a duplicate post which has already been answered at the following...
http://www.sqlservercentral.com/Forums/Topic941870-392-1.aspx
--Jeff Moden
Change is inevitable... Change for the better is not.
June 23, 2010 at 8:02 pm
Hi Jeff its my mistake, in the previous post initially i hav posted with only one business case but later when i got deep into the case, got to know there are 2 other cases where in the solution might not get applied so thought of reposting the scenario again clearly in new post
apologize for any unintentional act....
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply