2 Oracle SQL中的标题行

时间:2017-04-06 19:37:03

标签: sql oracle

我有下表:

Extra Information      Details              VALUES
------------------     -------------------- --------
Academic Rank          Academic Rank        Professor    
Academic Rank          Effective Start Date 01-JAN-2017
Academic Rank          Effective End Date   02-JAN-2018
Academic Rank          Next Academic Rank   Master
Alien Income Forecast  Income_code          P
Alien Income Forecast  Amount               10000
Alien Income Forecast  Year                 2017
Passport Details       COUNTRY              US
Passport Details       PASSPORT_NUMBER      1XX
Passport Details       ISSUE_DATE           01-JAN-2017
Passport Details       EXPIRE_DATE          02-JAN-2018

我希望在SQL中格式化它并使它看起来像这样:

Academic Rank                                                                   Alien Income Forecast       Passport Details
------------------------------------------------------------------------------  ------------------------    ------------------------------------------------
Academic Rank   Effective Start Date    Effective End Date  Next Academic Rank  Income_code Amount  Year    COUNTRY PASSPORT_NUMBER ISSUE_DATE  EXPIRE_DATE
-------------   --------------------    ------------------  ------------------  ----------  ------  ----    ------  --------------- ----------  ------------
Professor       01-JAN-2017             02-JAN-2018         Master              P           10000   2017    US      1XX             01-JAN-2017 02-JAN-2018

它类似于Excel中的Merge Cell,其中我有2个标题(Main Header和一些Sub Headers)来呈现数据。 我认为这是不可能的,但我只是想确定一下。

0 个答案:

没有答案