本文介绍了需要转置以下数据以生成每个记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

名字child1 sex1 child2 sex2 child3 sex3

-------------------------------- -------------------------------------------------- ----

Jan Rown Peter Rown男性火腿男性Amy Rown女性

Pal Sax John Sax男性Allen Sax男性



转置上述数据以生成以下记录



name child_name sex

--------- -----------------------

Jan Rown Peter Rown男性

Jan Rown Ham Rown男

Jan Rown Amy Rown女性

Pal Sax John Sax男士

Pal Sax Allen Sax男士



我尝试过的事情:



检查参考文献的早期编码,我不能得到帮助。



检查网但是没有确切的例子

name child1 sex1 child2 sex2 child3 sex3
--------------------------------------------------------------------------------------
Jan Rown Peter Rown Male Ham Rown Male Amy Rown Female
Pal Sax John Sax Male Allen Sax Male

Transpose the above data to generate the following records

name child_name sex
--------------------------------
Jan Rown Peter Rown Male
Jan Rown Ham Rown Male
Jan Rown Amy Rown Female
Pal Sax John Sax Male
Pal Sax Allen Sax Male

What I have tried:

Checked earlier coding from references and I coudn't get help.

Checked the net but coudln't exact example

推荐答案


这篇关于需要转置以下数据以生成每个记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 16:24