Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ERROR 923 FROM not found where expected

Posted on 2009-07-13
5
Medium Priority
?
1,053 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.  …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

604 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