Solved

ERROR 923 FROM not found where expected

Posted on 2009-07-13
5
1,031 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 500 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
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…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

724 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