Cannot user Sequence in Oracle 12 Insert

I am trying to use a Sequence in an Oracle 12 insert statement, one sample works, the other does not.  I need help understanding why second one does not work

This works:

CREATE SEQUENCE supplier_seq
  MINVALUE 1
  START WITH 1
  INCREMENT BY 1
  CACHE 20;

create table suppliers (supplier_id integer, supplier_name nvarchar2(40));

INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(supplier_seq.NEXTVAL, 'Kraft Foods');


This does not work, it generates the following error:

Error report -
SQL Error: ORA-02201: sequence not allowed here
02201. 00000 -  "sequence not allowed here"
*Cause:    An attempt was made to reference a sequence in a from-list.
*Action:   A sequence can only be referenced in a select-list.

CREATE SEQUENCE TTA_LABOR_EXPORT_SEQ
  MINVALUE 1
  START WITH 1
  INCREMENT BY 1
  CACHE 20;

CREATE TABLE TTA_LABOR_EXPORT
(
Record_Number              integer,
Employee_Number            nvarchar2(40) not null,
Cost_Center                  nvarchar2(80),
SAP_Activity_Type      nvarchar2(10),
Facility                  nvarchar2(40) not null,
Charge_Type                  char(1) not null,
Charge_Number            nvarchar2(80),
Operation_Number      nvarchar2(80),
Posting_Date            Date not null,
Hours_Type                  nvarchar2(2) not null,
Hours_Original            Number not null,
Hours_TTA                  Number,
Rate_Original            Number,
Rate_TTA                  Number,
Cost_Original            Number,
Cost_TTA                  Number,
Trans_action_Id            Number not null,
Export_Output_Id      Number,
Record_Status            Char(1) not null,
Error_Code                  nvarchar2(40),
Error_Text                  nvarchar2(250)
);

INSERT INTO TTA_LABOR_EXPORT_SEQ(RECORD_NUMBER,EMPLOYEE_NUMBER, COST_CENTER, SAP_ACTIVITY_TYPE, FACILITY, CHARGE_TYPE, CHARGE_NUMBER, OPERATION_NUMBER, POSTING_DATE,
HOURS_TYPE, HOURS_ORIGINAL, HOURS_TTA, RATE_ORIGINAL, RATE_TTA, COST_ORIGINAL, COST_TTA, TRANS_ACTION_ID, EXPORT_OUTPUT_ID,
RECORD_STATUS, ERROR_CODE, ERROR_TEXT ) VALUES (TTA_LABOR_EXPORT_SEQ.nextval,'T', 'T', 'T', 'T', 'T', 'T', 'T',
to_date('2014/08/21 00:00:00', 'yyyy/mm/dd hh24:mi:ss'), 'T', 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 'T', 'T', 'T'
);
Gary AntonellisSenior Application ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
My guess is it is complaining that you are trying to insert into the sequence not the actual table:
INSERT INTO TTA_LABOR_EXPORT_SEQ(
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary AntonellisSenior Application ConsultantAuthor Commented:
I am going blind, looked at that multiple times and did not see it.   Thank you for pointing out the obvious!!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.