Hi, i have a requirement as follows.
| Value | ayValue |
| A | 1 |
| 23 | |
| 21 | |
| 22 | |
| B | 34 |
| 31 | |
| 89 | |
| C | 222 |
| 10 |
Output:
| Value | ayValue |
| A | 1 |
| A | 23 |
| A | 21 |
| A | 22 |
| B | 34 |
| B | 31 |
| B | 89 |
| C | 222 |
| C | 10 |
I need this in ms sql and mysql, please help me.
| Value | ayValue |
| A | 1 |
| 23 | |
| 21 | |
| 22 | |
| B | 34 |
| 31 | |
| 89 | |
| C | 222 |
| 10 |
| Value | ayValue |
| A | 1 |
| A | 23 |
| A | 21 |
| A | 22 |
| B | 34 |
| B | 31 |
| B | 89 |
| C | 222 |
| C | 10 |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shweta LodhaRank #31 · 39.8K reputationPosted Jul 26, 2018, 2:51 AM EDT
Sai ReddyRank #6,320 · 270 reputationPosted Jul 26, 2018, 2:59 AM EDT
Jenith ThakkarRank #789 · 2.9K reputationPosted Jul 26, 2018, 3:13 AM EDT
please execute this script for more understanding