aspose file tools*
The moose likes Oracle/OAS and the fly likes Issue with the 'FROM' keyword Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Issue with the Watch "Issue with the New topic
Author

Issue with the 'FROM' keyword

John Paterson
Ranch Hand

Joined: Mar 12, 2012
Posts: 126
Hi guys...

I was trying out the following piece of code from the Murach book when I ran into some trouble. The code is as follow:



The error message I get is as follow:

ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
*Cause:
*Action:
Error at Line: 3 Column: 7


I am quite baffled by the message, to me 'FROM' seems to be in the right place, furthermore I got it from the book itself. Hope someone can shed some light on this. Thanks.

regards
John
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

Is the code retyped manually from the book? Didn't you omit a string concatenation operator (double pipe - ||) by chance? I'd say the two SUBSTRs are meant to be concatenated together to form the initials, between lines 2 and 3.

The error message is a bit baffling, but this is because these kind of errors are hard to qualify. If you omit a closing bracket in Java, the compiler's error message also won't be "missing closing bracket", but "illegal start of expression","annotation type not applicable to this kind of expression" or yet something else depending on the exact situation after the missing bracket. You'll learn to recognize this kind of errors and look around for omitted operators, commas and semicolons very soon.
John Paterson
Ranch Hand

Joined: Mar 12, 2012
Posts: 126
Hi Martin Vajsar.

Yes it's manually typed and I have indeed missed the concatenation operator. Thanks for point it out to me.

regards
John
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

You're welcome!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with the 'FROM' keyword