日期:2014-05-17  浏览次数:20864 次

SQL问题求教,急,在线等
原格式是这样的
Contract No	Production Order No	FID	CABNO	type	budget	change_id
722a24-001 800008330981 UCYD6CC14196 +91AA01 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330981 UCYD6CC14196 +91AA01 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330981 UCYD6CC14196 +91AA01 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330982 UCYD6CC14197 +91AA02 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330982 UCYD6CC14197 +91AA02 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330982 UCYD6CC14197 +91AA02 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330983 UCYD6CC14198 +91AA03 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330983 UCYD6CC14198 +91AA03 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330983 UCYD6CC14198 +91AA03 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330985 UCYD6CC14199 +91AA04 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330985 UCYD6CC14199 +91AA04 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330985 UCYD6CC14199 +91AA04 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330986 UCYD6CC14200 +91AA05 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330986 UCYD6CC14200 +91AA05 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330986 UCYD6CC14200 +91AA05 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330987 UCYD6CC14201 +91AA06 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330987 UCYD6CC14201 +91AA06 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330987 UCYD6CC14201 +91AA06 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330988 UCYD6CC14202 +91AA07 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330988 UCYD6CC14202 +91AA07 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330988 UCYD6CC14202 +91AA07 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330990 UCYD6CC14203 +91AA08 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330990 UCYD6CC14203 +91AA08 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330990 UCYD6CC14203 +91AA08 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330991 UCYD6CC14204 +PUMP01 Assembling 9 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330991 UCYD6CC14204 +PUMP01 Testing 1 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330991 UCYD6CC14204 +PUMP01 Wiring 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75


希望是这样的格式
Contract No	Production Order No	FID	CABNO	Assembling	Testing	Wiring	change_id
722a24-001 800008330981 UCYD6CC14196 +91AA01 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F75
722a24-001 800008330982 UCYD6CC14197 +91AA02 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F76
722a24-001 800008330983 UCYD6CC14198 +91AA03 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F77
722a24-001 800008330985 UCYD6CC14199 +91AA04 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F78
722a24-001 800008330986 UCYD6CC14200 +91AA05 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F79
722a24-001 800008330987 UCYD6CC14201 +91AA06 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F80
722a24-001 800008330988 UCYD6CC14202 +91AA07 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F81
722a24-001 800008330990 UCYD6CC14203 +91AA08 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F82
722a24-001 800008330991 UCYD6CC14204 +PUMP01 9 1 8.5 ADB0285F-FE9F-495A-BAE5-C9504CD59F83
sql