Solved

ERROR 923 FROM not found where expected

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Outer Query not returning data - SQL HELP 16 50
Oracle Syntax 8 56
Oracle - Stored Procedure Privilge access 3 39
Oracle 10g - insert string with special characters 8 41
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

920 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

12 Experts available now in Live!

Get 1:1 Help Now