question

anna avatar image
anna asked

How to merge 2 rows into one ?

I have a query that displays result as rn1 rn2 id1 id2 amount1 rate1 amount2 rate2 1 5 A B 3400 12 4400 21 3 1 A B 2565 15 5675 19 1 1 C D 1287 08 6546 23 8 1 E F 5437 24 2344 11 1 10 E F 7648 33 6548 17 Of this i need to filter and show result as rn1 rn2 id1 id2 amount1 rate1 amount2 rate2 1 1 A B 3400 12 5675 19 1 1 C D 2565 15 6546 23 1 1 E F 7648 33 2344 11 1 1 C D 1287 08 8 1 E F 5437 24 1 10 E F 7648 33
merge
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GPO avatar image GPO commented ·
There's not enough detail about what you're trying to achieve here. Also your "filtered" dataset contains more rows than the unfiltered one. Is that intentional?
1 Like 1 ·

1 Answer

·
Tom Staab avatar image
Tom Staab answered
This isn't really an answer (yet), but I wanted to be able to reformat the display of the data to make it easier to understand. Can you explain the data and how/what you are trying to merge? As I said, I tried to reformat the data. Is this correct? If so, why don't the last 3 rows have values for amount2 and rate2? rn1 rn2 id1 id2 amount1 rate1 amount2 rate2 1 5 A B 3400 12 4400 21 3 1 A B 2565 15 5675 19 1 1 C D 1287 08 6546 23 8 1 E F 5437 24 2344 11 1 10 E F 7648 33 6548 17 n1 rn2 id1 id2 amount1 rate1 amount2 rate2 1 1 A B 3400 12 5675 19 1 1 C D 2565 15 6546 23 1 1 E F 7648 33 2344 11 1 1 C D 1287 08 8 1 E F 5437 24 1 10 E F 7648 33
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.