Hive - insert error

Hi,

I have 2 table ‘salaries_staging’ populated with data and stored in textfile format with below schema.
Now i have created another table sal_orc which have consists of some of the columns of ‘salaries_staging’ table.

Aim is: To insert data from ‘salaries_staging’ table into ‘sal_orc’ based on some where condition.
It is giving me below error.please help to solve this.

‘salries_staging’ table:

create table salaries_staging(
id int,
EmployeeName string,
JobTitle string,
BasePay float,
OvertimePay float,
OtherPay float,
Benefits float,
TotalPay float,
TotalPayBenefits float,
Year int,
Notes string,
Agency string)
row format delimited fields terminated by ','
stored as textfile;

Loading:

load data local inpath ‘/root/sf-salaries-2011-2013.csv’ into table salaries_staging;

sal_orc table:

CREATE TABLE sal_orc(
employeename string,
jobtitle string,
basepay float,
overtimepay float,
otherpay float,
benefits float,
totalpay float)
stored as ORC;

insert:

insert into table sal_orc select JobTitle,BasePay,OvertimePay,OtherPay,Benefits,TotalPay from salaries_staging where totalpay <= 18500.19;

Error:

FAILED: SemanticException [Error 10044]: Line 1:18 Cannot insert into target table because column number/types are different ‘sal_orc’: Table insclause-0 has 7 columns, but query has 6 columns.

Thanks in advance.

Got the answer:

Concept: CTAS (create table as select):

CREATE TABLE sal_orc
stored as ORC
as
select JobTitle,BasePay,OvertimePay,OtherPay,Benefits,TotalPay from salaries_staging where totalpay <= 18500.19;