Combining Columns/Rows with same cell value as Key

Raymond4

New member
Local time
Today, 02:27
Joined
May 20, 2013
Messages
2
Hi,

Hello to all, I am a beginner in SQL, I have a problem regarding combining rows/ columns having value. Below is my example:

Table1:
1 123 23 43
1 234 3 431
2 34 34 34
2 54 3 123
3 1 32 32
2 341 1 32

Output Table:
1 123 23 43 234 3 431
2 34 34 34 54 3 123 341 1 32
3 1 32 32

or instead of combining rows, getting the result by combining columns with the same condition.

How can I obtain such result? I would appreciate very much any help that can be give, either thru SQL command or Visual Basic programming.

Thank you in advance hoping someone can help me.


Regards,
Raymond
 
Hi,

Thank you for your responses, I already read the articles but it seems different from what I want to obtain.

The values will not be concatenated but rather append to the existing row/columns. I mean like this:

1 2 1 1 2
3 4 9 6 3
_ 5 4 2 7
2 4

result to this:

1 2
3 4
_ 5
2 4
9 3
4 7
6
2

where their arrangement is unaltered and even blank values retains its position because this is just a part of step in order for me to obtain the final result which can be done through another SQL statement.So if I were to use the concatenation method, then I will do an extra step(s) to obtain the final result. :(

Hoping you can help me on this.

Thank you very much.


Best Regards,
Raymond
 
Last edited:

Users who are viewing this thread

Back
Top Bottom