Home > database >  The oracle database queries
The oracle database queries

Time:09-24

The first table
The second table

How to change the second table above the field name to with the Chinese name of the face should be the first list

CodePudding user response:

The building Lord baidu Oracle + unpivot, have questions to ask;

CodePudding user response:

reference 1st floor wmxcn2000 response:
the building Lord baidu Oracle + unpivot, there are questions to ask;

Column swing line is?
Select * from T_HR_SCHMHIS_661459830094394 a
UNPIVOT (
FNUMBER FOR FNAME_L2 IN
(FFSAL207 AS 'FFSAL207 FSAL041 AS' FSAL041, FSAL007 AS 'FSAL007, FFSAL224 AS' FFSAL224, FFSAL235 AS 'FFSAL235')
);

There is no effect

CodePudding user response:

refer to the second floor xlh0053 response:
Quote: refer to 1st floor wmxcn2000 response:

The building Lord baidu Oracle + unpivot, have questions to ask;

Column swing line is?
Select * from T_HR_SCHMHIS_661459830094394 a
UNPIVOT (
FNUMBER FOR FNAME_L2 IN
(FFSAL207 AS 'FFSAL207 FSAL041 AS' FSAL041, FSAL007 AS 'FSAL007, FFSAL224 AS' FFSAL224, FFSAL235 AS 'FFSAL235')
);

No effect




refer to the second floor xlh0053 response:
Quote: refer to 1st floor wmxcn2000 response:

The building Lord baidu Oracle + unpivot, have questions to ask;

Column swing line is?
Select * from T_HR_SCHMHIS_661459830094394 a
UNPIVOT (
FNUMBER FOR FNAME_L2 IN
(FFSAL207 AS 'FFSAL207 FSAL041 AS' FSAL041, FSAL007 AS 'FSAL007, FFSAL224 AS' FFSAL224, FFSAL235 AS 'FFSAL235')
);

No effect



And I this is the first table to link the second table data, has nothing to do with the ranks of conversion? Don't understand

CodePudding user response:

Field? Manual match,,

CodePudding user response:

Directly to the case when solved

CodePudding user response:

The select FFSAL001 as' basic salary, FFSAL002 as' bonus' T_HR_SCHMHIS_661459830094394

Like this, the rest of the building Lord your completion

Upstairs of you understand the wrong meaning, the landlord don't want to put the table into table 2

CodePudding user response:

reference 5 floor weixin_41637486 reply:
direct case has been solved when

Decode and case the when is fine, but too many fields, more than 100

CodePudding user response:

refer to 7th floor xlh0053 response:
Quote: refer to fifth floor weixin_41637486 response:

Direct case solved the when

Decode and case the when is fine, but too many fields, more than 100

Rather than unpivot, pivot, you go to check the grammar, are to be in more than one hundred fields, eliminating the case the when

CodePudding user response:

Column names in Chinese to is rare, this you can use dynamic SQL with code first then in a dynamic execution of SQL SQL execution
  • Related