Solved

ERROR 923 FROM not found where expected

Posted on 2009-07-13
5
995 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
  • 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 31

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 31

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now