• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Issue with the 'FROM' keyword

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 Vashko
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome!
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic