-
concatenation problem
i am having data something like this:
number starting point ending point
1 ABC DEF
2 DEF ABC
1 PQR STU
2 STU PQR
1 ABC DEF
2 DEF PQR
3 PQR ABC
and i want it to be like this in my new table based on number column:
CONCATENATED
ABC/DEF/ABC
PQR/STU/PQR
ABC/DEF/PQR/ABC
can anyone suggest me how to write a query for this one?
-
You need to write a procedure to loop through the rows. The number of rows you need to concatenate is not same, so it may not be possible to write it in a query.
-
thnx for ur response................
-
I think you need another column in this query. How do you know that the first "1 ABC DEF" record is to be concatenated with the "2 DEF ABC" record instead of the "2 DEF PQR" record? If these are supposed to be processed in some sort of order, there has to be another column used to do this ordering for a loop to work. Or, there needs to be another column used to group like records together.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|