Possible Duplicate:
function or SP or cursor question
I have table as follow.
Table Name:Industrial
ID Industry
1 Metal minings & Chemicals
2 Ceramics minings & pottery
3 Pottery minings & ceramics
4 Chemicals petrol & ceramics
5 Chemicals minings & ceramics
6 Ceramics pottery & petrol
Output should be
Temp Table
ID Industry
1 Metals
2 Minings & chemicals
3 Ceramics
4 minings & pottery
5 Pottery
6 Minings & Ceramics
7 Chemicals
8 Petrol & Ceramics
9 Chemicals
10 Mining & Ceramics
11 Ceramics
12 Pottery &petrol
As you can see in Temp table there are duplicate records,it should be eliminated
Actual output should be
Temp Table
ID Industry
1 Metals
2 Minings & chemicals
3 Ceramics
4 minings & pottery
5 Pottery
6 Minings & Ceramics
7 Chemicals
8 Petrol & Ceramics
9 Pottery &petrol
Delimiter used for this break down of Industry column is char(30)+char(20)
I think we can declare varaible delimiter and set it to char(30)+char(10).
Please help me to write complete function for this output.
asked
Jun 04 '10 at 07:12 AM
in Default
anamika
2
●
2
●
2