java.sql.SQLException: ORA-00923: FROM keyword not found where expected

Hi,i am connecting to oracle database from my DAO's by usingStringBuffer's. But i am getting following exception.......java.sql.SQLException:: ORA-00923: FROM keyword not foundwhereexpected
[212 byte] By [mkva] at [2007-11-27 9:46:33]
# 1
Your SQL is invalid (just as the error message says)
kajbja at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 2
> Your SQL is invalid (just as the error message says)I'm willing to bet that he is concatenating strings to build the query, and has forgotten to insert a space after the last/before the "FROM". ;-)
masijade.a at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 3

> > Your SQL is invalid (just as the error message

> says)

>

> I'm willing to bet that he is concatenating strings

> to build the query, and has forgotten to insert a

> space after the last/before the "FROM". ;-)

You're going out on a limb, there. I am willing to bet that the FROM keyword is not found where expected.

BigDaddyLoveHandlesa at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 4

> > > Your SQL is invalid (just as the error message

> > says)

> >

> > I'm willing to bet that he is concatenating

> strings

> > to build the query, and has forgotten to insert a

> > space after the last/before the "FROM". ;-)

>

> You're going out on a limb, there. I am willing to

> bet that the FROM keyword is not found where expected.

Note: Should have been "after the last field/before the FROM keyword, but I assume you already knew that.

And yes, it is going out on a limb, but speaking from experience, most people that post that error do exactly the above. It is an extremely common error, and extremely easy to make. And, normally, once you have made it once, you learn to look for that type of mistake first, when you get a syntax error, but sometimes, people embarress themselves a bit finding that error for the first time. ;-)

masijade.a at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 5
I forgot to include::-) :-) :-)Note: smilies also foul-up SQL syntax, so be sure to comment them out.
BigDaddyLoveHandlesa at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 6
In future JDBC questions should be posted into the JDBC forum.
cotton.ma at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 7
> I forgot to include:> > :-) :-) :-)> > Note: smilies also foul-up SQL syntax, so be sure to> comment them out.Cool. ;-))))))(Notice my chins.)
masijade.a at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 8

> > I forgot to include:

> >

> > :-) :-) :-)

> >

> > Note: smilies also foul-up SQL syntax, so be sure

> to

> > comment them out.

>

> Cool. ;-))))))

>

> (Notice my chins.)

Are you challenging me to a double-chin contest, young man?

I leave them off my smilies because I don't have the time to

add them all...

BigDaddyLoveHandlesa at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 9

> In future JDBC questions should be posted into the

> JDBC forum.

Hey cotton, don't you know that this is the super dooper Java, J2SE, J2EE, XML, Tomcat, Obscure API + any random open source library you can think of in the world ever, forum?

You are starting to sound like camickr!

:-)

_helloWorld_a at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...
# 10

> > > I forgot to include:

> > >

> > > :-) :-) :-)

> > >

> > > Note: smilies also foul-up SQL syntax, so be

> sure

> > to

> > > comment them out.

> >

> > Cool. ;-))))))

> >

> > (Notice my chins.)

>

> Are you challenging me to a double-chin contest,

> young man?

> I leave them off my smilies because I don't have the

> time to

> add them all...

Naaaah, we don't don't want to set all that mass into motion, we'll never know when (or where) it'll stop.;-)

masijade.a at 2007-7-12 23:57:17 > top of Java-index,Java Essentials,Java Programming...