?
Solved

ERROR 923 FROM not found where expected

Posted on 2009-07-13
5
Medium Priority
?
1,044 Views
Last Modified: 2013-12-19
I am getting error message but do not see a problem with my query.
ERROR 923 FROM not found where expected.
I included the sql & the table.
Can anyone help?
Thanks!
Beth


SELECT 
TRANSACTION_DATE,
PACKLIST_NO NUMBER,
TRANSACTION_CODE,
JOBCOST_UNITS,
COST_PER_UNIT,
JOBCOST_UNITS * COST_PER_UNIT AS "EXTENDED PRICE"
 
FROM JOBCOST
 
SORT BY TRANSACTION_DATE;
 
CREATE TABLE JOBCOST   
  ( JOBCOST_REF_NO NUMBER(8,0)  
  , PACKLIST_NO NUMBER(8,0) NOT NULL
  , TRANSACTION_DATE DATE
  , TRANSACTION_CODE CHAR(1)
  , TRANSACTION_CROSS_REF CHAR(1)
  , CLOCK_NO NUMBER(8,0)
  , JOBCOST_UNITS NUMBER(5,0)
  , COST_PER_UNIT NUMBER(5,2)
  , CONSTRAINT TRANSACTION_CD CHECK (TRANSACTION_CODE IN ('R','S','D','L','O','C','U'))
  , CONSTRAINT TRANSACTION_CROSS CHECK (TRANSACTION_CROSS_REF IN ('R','S','D','L','O','C','U'))
);

Open in new window

0
Comment
Question by:ba_trainer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24842496
If using SQLPLUS don't use empty lines, it causes a parse error:

SELECT
TRANSACTION_DATE,
PACKLIST_NO NUMBER,
TRANSACTION_CODE,
JOBCOST_UNITS,
COST_PER_UNIT,
JOBCOST_UNITS * COST_PER_UNIT AS "EXTENDED PRICE"
     <-- REMOVE EMPTY LINE -->
FROM JOBCOST
     <-- REMOVE EMPTY LINE -->
SORT BY TRANSACTION_DATE;
0
 
LVL 32

Expert Comment

by:awking00
ID: 24842504
order by transaction_date => not sort by
Also, remove the blank lines between the attribute list and the from clause and the from clause and the order by clause.
0
 

Author Comment

by:ba_trainer
ID: 24842523
I've tried everything.
This one should be very simple, but I can't get it.
SELECT 
TRANSACTION_DATE,
PACKLIST_NO NUMBER,
TRANSACTION_CODE,
JOBCOST_UNITS,
COST_PER_UNIT,
JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED PRICE
FROM JOBCOST;

Open in new window

0
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 total points
ID: 24842537
>>JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED PRICE

EXTENDED PRICE cannot be two words, or else you must quote it.

Add enclosing quotes.

JOBCOST_UNITS * COST_PER_UNIT AS "EXTENDED PRICE"
0
 
LVL 32

Expert Comment

by:awking00
ID: 24842565
Or use underscore in the alias name,
... AS EXTENDED_PRICE
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question